Related ToolsClaude CodeCursorAiderCodyContinue

Claude Code's 200K Context Window Is Not Enough for Large Projects

Claude by Anthropic
Image: Anthropic

200,000 tokens sounds like a lot. That is roughly 150,000 words, or about 500 pages of text. But developers working with Claude Code on real-world codebases are burning through that context window (the amount of text the AI can "remember" in a single session) faster than expected, and the workarounds range from clever to painful.

The problem is not the raw size of most codebases. It is the accumulation of tool calls, file reads, search results, and conversation history that eats through context during a working session. A developer debugging an issue across multiple files can exhaust 200K tokens in under an hour, at which point Claude Code starts compressing earlier messages and losing track of decisions made earlier in the session.

What Actually Helps

CLAUDE.md files are the single most effective tool. These project-level instruction files persist across sessions and load automatically, giving Claude Code baseline knowledge about your project without spending conversation tokens rediscovering it each time. Developers with well-maintained CLAUDE.md files report significantly longer productive sessions.

Subagents help by offloading discrete tasks to separate context windows. Instead of searching your codebase in the main conversation (which dumps all those search results into your context), you can delegate to a subagent that does the searching in its own isolated window and returns only the relevant findings. This keeps the main context cleaner.

Smaller, focused sessions beat marathon ones. Starting a new conversation for each distinct task, rather than trying to do everything in one session, sidesteps the problem entirely. The tradeoff is losing conversational continuity, but a good CLAUDE.md file bridges much of that gap.

Compact mode triggers automatically when context gets large, summarizing earlier parts of the conversation. It works reasonably well for retaining the gist of what happened, but specific details from early in the session can get lost. Treat it as a safety net, not a strategy.

What Does Not Help

Manually summarizing your own context mid-session wastes tokens on the summary itself. Pasting entire files into chat when you could use file-read tools burns context on content that the tool could reference more efficiently. And trying to front-load all project knowledge into the first message just moves the bottleneck from mid-session to start-of-session.

The 200K limit is a real constraint for complex projects, but it is a solvable one. The developers who hit it least are the ones who treat context like a budget: spend it on decisions and analysis, not on information retrieval that tools can handle more efficiently.