Error / Message
Context window exceeded
The conversation, including file contents and tool output, has grown too large for the model to hold in a single request.
Every message, file read, and tool result in a session counts against a fixed context budget. Long sessions — especially ones involving reading large files or many tool calls — eventually approach that limit, and Claude Code warns before it becomes a hard failure.
The fix depends on whether the earlier context still matters. If it does, /compact summarizes it down to something much smaller while keeping the gist. If the task has genuinely moved on to something unrelated, /clear starting a fresh context is usually the better call.
This isn't a bug or a sign something went wrong — it's an inherent limit of how these models work, and a normal part of any long session.
Run /compact or /clear when you see this warningFrequently asked questions
What does "Context window exceeded" mean in Claude Code?
The conversation, including file contents and tool output, has grown too large for the model to hold in a single request.
How do I fix it?
Try: Run /compact or /clear when you see this warning
Is this something to worry about?
This isn't a bug or a sign something went wrong — it's an inherent limit of how these models work, and a normal part of any long session.
Is this covered in OG Flow Code Premium Toolkit?
Yes — Context window exceeded and patterns like it are covered by the commands, and in higher tiers the specialist agents and guided skills, in OG Flow Code Premium Toolkit. Tiers start at $19.90.
Want the full command, hook, and template pack?
This is one pattern from the OG Flow Code toolkit. Choose the tier that fits your workflow, including Multi-Stack for six additional language stacks.
See pricing — from $19.90 once