7.1 — The context window: your critical resource
Claude Code's context window is its working memory. Every character you send, every file read, every response generated consumes tokens in that window. When it fills up, performance degrades measurably: Claude forgets instructions, loses precision, and produces lower-quality code.
Think of the context window like a computer's RAM. You wouldn't launch fifty applications on a machine with four gigs of RAM and expect smooth operation. It's exactly the same here. The context window is a finite resource, and this entire module revolves around one simple idea: manage it intelligently.
In practice, Claude Code displays your token consumption via the status line. The /cost command gives you a detailed snapshot: input tokens, output tokens, percentage used, percentage remaining. When you exceed one million tokens, the display switches to shortened format, "1.2m", "1.5m". That's your alarm signal.
# Check your consumption at any time
/cost
# The status line shows continuously:
# - used_percentage: how much of the window is consumed
# - remaining_percentage: how much you have left
Claude Code automatically triggers a compaction when the window approaches its limit, but waiting for that point is already too late. Performance has started to degrade well before. Your goal is to act proactively, not reactively.
Key takeaways
The context window is your most critical resource. Monitor /cost regularly. When the used percentage rises without your task advancing, that's the sign it's time to act, the following sub-modules explain exactly how.