Claude Code context window: what it is and how to monitor it

Claude Code has three limits that can stop your work — and two of them get all the attention while the third sneaks up on you. Here's what each one means.

Session limit (5h)
Resets every 5 hours. Exhausted by heavy usage in a single session.
Weekly cap (7d)
Resets weekly. Accumulates across all sessions over 7 days.
Context window
Fills as your conversation grows. Cleared by /clear or when Claude Code truncates.

The session and weekly limits are rate limits — Claude's infrastructure enforcing plan quotas. The context window is different: it's a technical constraint of the underlying model. As your conversation with Claude Code gets longer, the context fills up. When it's full, Claude Code has to drop earlier messages or you have to run /clear.

Why the context window is sneaky

Most monitoring tools focus on the session and weekly limits because those are the ones that fire a hard stop. The context window fails differently — it degrades. As it fills:

There's no error message. The session limit gives you a hard stop; the context window gives you a gradual degradation that's harder to catch.

How to see it

Claude Code's /usage command shows all three meters:

/usage
# → Session (5h): 23%
# → Weekly (7d): 67%
# → Context: 41%

But /usage is a command you have to remember to run. For ambient awareness, you want something passive.

Ambient monitoring with Headroom

Headroom is a free macOS menu bar app that shows all three meters continuously, color-coded as they approach limits:

CC 23%·67%·41%   ← session · weekly · context (optional, in dropdown)

The menu bar normally shows the two rate limits (session + weekly) since those fire the hard stops. The context window percentage appears in the dropdown alongside the model name, session cost, and reset countdowns. When context is above 70%, Headroom color-codes it amber — giving you a heads-up before coherence degrades.

How Headroom reads the context window: Claude Code tracks context fill in its own status line data. Headroom's hook captures this locally — the same source as /usage, but written to ~/.claude/headroom-usage.json automatically. No API polling, no credentials, no network calls.

When to /clear vs. waiting it out

The context window doesn't block you the way rate limits do. When it fills, you have options:

Headroom's context percentage tells you when you're approaching the point where you'll need to make this choice — before the degradation becomes obvious in Claude's responses.

The three-number view

A complete picture of your Claude Code state has three numbers:

Session:   23%  (5h window, hard stop at 100%)
Weekly:    67%  (7d cap, hard stop at 100%)
Context:   41%  (current conversation, soft degradation as it fills)

Most monitors only show the first two. Headroom shows all three — in the menu bar for session + weekly, and in the dropdown for context.

Headroom shows all three Claude Code limits at a glance — session %, weekly %, and context fill in the dropdown. Free, zero config, native macOS.
Download Headroom — free

brew install --cask patwalls/tap/headroom