Lv.1 0 XP

Context Window Basics — What It Is and Why It Fills Up

Core 8 min +30 XP
💡
THE ANALOGY

A whiteboard in a meeting room. Everyone can see everything on it. As the meeting progresses you keep adding — but the whiteboard has a finite size. When it's full, old content gets erased to make room. The context window is that whiteboard. What stays and what gets erased determines the quality of the conversation.

⚠️ EXAM TRAP — The Wrong Answer People Choose

Thinking context window management is only about preventing overflow. The real issue is WHAT fills the window — verbose tool outputs, repeated context, and irrelevant history crowd out the reasoning space Claude needs.

KEY POINTS
1 The context window holds everything Claude sees: system prompt, conversation history, tool results, and the current message.
2 Claude's attention is not uniform across the window — content in the middle receives less attention than content at the start or end (lost-in-the-middle effect).
3 Tool results are the fastest context filler — a single database dump can consume 40% of the window.
4 The fix is not just 'stay under the limit' — it's actively managing WHAT occupies the window to keep signal high.
5 Context exhaustion in long-running agents causes hallucination as Claude starts reasoning about content it can no longer 'see' clearly.