The Context Window
Claude's short-term memory for the current conversation — everything it can “see” right now, and it has a hard limit.
Every message, every file Claude Code has read, and every response it has generated in the current session lives in its context window. It's finite, and when a conversation runs long or pulls in a lot of file content, older information starts getting crowded out. The video calls the resulting symptom “context rot”: Claude Code seems to forget earlier instructions or contradicts itself, similar in feel to hallucination in a regular chatbot.
The fix is still the same: keep sessions focused on one task, start a fresh session (/clear) when you switch topics, and use /compact to summarize and free up space mid-session. Most interfaces show a visual indicator of how full the context window is (a colored bar or percentage) so you can see this coming before quality drops.
Real-life use cases
Catching context rot before it bites
Mid-way through a long refactor, Claude Code starts re-suggesting an approach you already rejected. Recognizing this as context rot rather than a reasoning failure, you run /compact instead of arguing with it further.
One task, one session
Instead of using a single marathon session for the whole day's work, a user starts a new session per distinct task (backend fix, then frontend styling, then docs), keeping each context window focused and outputs sharper.
Source
- Source video: “Claude Code Explained” — 27 concepts in 27 minutes (YouTube)https://www.youtube.com/watch?v=ZlDnsf_DOzg
- Context windowhttps://code.claude.com/docs/en/context-window