Fixing a broken Claude Projects context window A developer reported that Claude Projects silently stopped honoring uploaded project knowledge after roughly 10 prompts, causing hallucinated imports and forgotten type definitions in a Next.js 14 and Tailwind dashboard built from about 15 files totaling roughly 20k tokens. The developer resolved the failures by purging the knowledge base down to package.json, layout.tsx, and the types folder, then using explicit @-referencing prompts such as "Using the definitions in @types/index.ts [Project File], refactor the following block. If the types conflict, prioritize the file over the current chat history." The account also notes that intelligence decay accelerated once the project reached about 40 files, prompting a shift to three separate modular Claude Projects. Fixing a broken Claude Projects context window I spent four hours on Thursday afternoon fighting a "context overflow" that didn't make sense. I was using Claude /en/tags/claude/ Projects to build a custom internal dashboard using Next.js 14 and Tailwind. I had uploaded my entire /components folder and package.json to the project knowledge base. Everything was humming along until I asked Claude to refactor a specific data table. Suddenly, it started hallucinating imports and forgetting the types I had defined in types/index.ts —even though that file was sitting right there in the Project files. The error wasn't a crash; it was a silent failure of intelligence. Claude started giving me the generic TypeError: Cannot read properties of undefined because it stopped "seeing" the schema updates I'd made ten prompts ago. Why the knowledge base lied to me The problem with Claude Projects is that just because a file is uploaded doesn't mean the model is actively paying attention to every line of it in every turn. I had about 15 files in the knowledge base, totaling maybe 20k tokens. While that's well within the 200k limit, the way the model prioritizes "Project Knowledge" vs. "Active Conversation" is finicky. When the chat history gets long, the model starts prioritizing the recent messages over the uploaded documents. It essentially "forgot" the codebase in favor of our conversation about a specific button's padding. I tried the standard "refer to the uploaded files" prompt. It didn't work. I tried starting a new chat within the project. That worked for three prompts, then it happened again. How I stopped the hallucination loop I realized I was treating the Project Knowledge base as a database, but it's more like a set of reference notes. To fix this, I changed my AI productivity workflow from "dump everything in" to a "surgical context" approach. First, I purged the project files. I removed everything except the absolute core: package.json , the main layout.tsx , and the specific types/ folder. Then, I used a specific prompt pattern to force the model to acknowledge the source of truth. Instead of saying "Fix this component," I started using: Using the definitions in @types/index.ts Project File , refactor the following block. If the types conflict, prioritize the file over the current chat history. The difference was immediate. Response time felt slightly slower—probably because it was actually searching the project files—but the code actually compiled. | Strategy | Result | Reliability | | :--- | :--- | :--- | | Dump all files in Project | High hallucination after 10 prompts | Low | | New chat every 5 prompts | Temporary fix | Medium | | Targeted @-referencing | Consistent type safety | High | Stop wasting tokens on redundant files If you're using Claude Projects, stop uploading your node modules obviously or even large CSS files. Upload your tailwind.config.js and your main theme file, then stop. Every extra kilobyte of noise in that knowledge base increases the chance the model ignores the one line of logic that actually matters. For those of us managing complex prompts across different projects, I've found that keeping a separate "context map" a simple .md file listing what each file does uploaded to the project helps the LLM navigate the files faster. It's basically a manual index for the AI. If you're struggling to organize these "context maps" or find a better way to structure your prompts for different coding tasks, checking out Prompt Sharing /en/category/prompts/ is a great way to see how others are indexing their project files without hitting the noise ceiling. Moving beyond the single project limit The real bottleneck I hit was when my dashboard project grew too large for a single Project context. Once I hit about 40 files, the "intelligence decay" happened faster. I shifted my workflow to a modular structure. I created three separate Claude Projects: 1. Schema & API Database types, Zod schemas, API routes 2. UI Components Shadcn components, Tailwind utilities 3. Feature Logic The actual page implementation It's a pain to switch projects, but it's better than spending an hour debugging a "phantom" error that only exists because the AI forgot what your API response looks like. Getting the most out of the community Working in a vacuum is how you end up spending four hours on a problem that someone else solved in five minutes. When I first hit the context wall, I didn't know if it was a Claude bug or my own prompt failure. Diving into the Resources /en/category/resources/ section of a developer community usually reveals that "context drift" is a known behavior across most long-context models. The wild part is that the "fix" isn't a better model; it's a better way of feeding the model information. If you want to see how these workflows integrate into a larger system, the PromptCube homepage /en/ shows a lot of the underlying logic on how to manage these AI interactions at scale. My current setup for any new Next.js project: - Project Knowledge: package.json , tsconfig.json , types/ .ts . - Active Chat: Paste the specific component code. - Command: "Refer to the project types to validate this logic." It's a tedious dance, but it's the only way to ensure the code actually runs when you hit npm run dev . Next Nemotron 3 Ultra hits 2.5x higher concurrency with full-stack NIM optimizations → /en/threads/9167/