New: SEO Blog Writer, a readable, checked blog post for your site every week. Pay once, download straight away.

See it
AI Skill Up
Browse skills

How to see how full your Claude Code context is while you work

Claude Code warns when context is nearly full. How to see the percentage the whole time instead, what the number counts, and what to do as it climbs past half.

Claude Code tells you about context when it is nearly full. By then you are deep in a task, and the choice is between compacting mid-thought and starting over. Seeing the number the whole time turns that into a decision you make early, at a natural break, instead of one made for you.

Putting the number on screen

Claude Code passes context_window.used_percentage to your status line script after each reply. The smallest useful status line is one line in ~/.claude/settings.json, taken from Claude Code's own docs:

"statusLine": {
  "type": "command",
  "command": "jq -r '\"[\\(.model.display_name)] \\(.context_window.used_percentage // 0)% context\"'"
}

That prints something like [Opus 5.5] 14% context. A bar is easier to read at a glance than a number, and colour is easier still: calm below about 60%, a warning above it, and a clear alarm near the end.

What the percentage counts

It is calculated from input tokens only: new input, cache writes and cache reads, from the most recent reply. Output is not counted. The window size comes with it as context_window_size, 200,000 tokens by default or 1,000,000 with extended context, so the same percentage means very different amounts on different models.

What to do as it climbs

  • Under half: nothing. Work.
  • Past half: finish the current step, then decide whether the next one needs everything that is loaded.
  • Near the end: compact at a natural boundary, or start a fresh session with a short written summary of where you are.

Much of what fills context is not the conversation at all. Every installed skill's description is read on every turn; what a skill costs you in context and many skills installed cover how to keep that small.

Pair it with the limits

Context is per session, and the usage limits are per account, but you decide about both at the same moments. Capsule Status Line puts them side by side: the model and context in one capsule, then the 5-hour and weekly limits with their exact reset times, all on one line.

Questions

What does the context percentage count?

Input tokens only: new input plus cache writes plus cache reads, from the most recent reply. Output tokens are not included, so the number reflects what Claude is reading, not what it wrote.

How big is the Claude Code context window?

200,000 tokens by default, or 1,000,000 for models with extended context. The status line data reports the size as context_window_size, so a script does not need to guess.

Why does my context percentage show nothing at the start?

It can be null early in a session, before the first reply has been measured. A good status line shows the model name alone until the number arrives.

Or skip the afternoonand drop one in.