2026-10-01 Claude Code context all - see exactly what eats your context window

Canonical version: 2026-10-01 Claude Code context all - see exactly what eats your context window.

Before you type anything, a Claude Code session already loads the system prompt, tools, MCP servers, agents, memory files and skills. All of it takes space in the same Context Window, and all of it is sent with every request.

/context shows that usage by category. /context all lists every item.

What it shows

Plain /context gives you a colored grid and a table by category: system prompt, MCP tools, MCP server instructions, deferred tools, custom agents, memory files, skills, messages, free space, and the autocompact buffer. It also flags context-heavy tools, memory bloat and capacity issues, with suggestions.

Add all and you get one table per category, with a token count per item:

  • MCP Tools: every loaded MCP tool, its server, and its cost
  • Custom Agents: each agent type, its source (user, project, plugin), and its cost
  • Memory Files: every CLAUDE.md (and imported file) with its path and size
  • Skills: every skill in the listing, its source (user or the plugin that provides it), and an estimate like ~150

Per the docs, the reason all exists is fullscreen mode: there, /context collapses the per-item breakdown to keep the grid visible, and all expands it again.

What it doesn't show

Built-in tools aren't broken down. You get one "System tools" line, nothing per tool. If you want to know what a single built-in tool costs, you have to measure it yourself: start a session with --disallowedTools <Tool> and compare the first request's token usage.

The skill numbers are estimates too. They now use the model's tokenizer and are rounded (~90, < 20), which is good enough to spot the heavy ones.

Recent fixes

Recent releases changed /context several times:

  • 2.1.139: per-skill estimates in /context all account for the model's tokenizer; plugin skills show the plugin that provides them
  • 2.1.216: an explicit warning when the conversation exceeds the context window
  • 2.1.261: a local estimate when the token-counting API is unavailable, instead of extra model calls
  • 2.1.281: the total now includes messages added since the last response, so it can read higher than the status line
  • 2.1.283: MCP server instructions get their own row and count toward the total

Before 2.1.283, long MCP server instructions were invisible in /context. If you measured your setup before that, measure again.

How I use it

When I trimmed the startup context of my vault, I started with /context. Here's my process:

  1. Run /context all in a fresh session to get a baseline, before any conversation
  2. Find the biggest items: the largest skills, the agents you never use, the MCP servers with dozens of tools
  3. Shrink them at the source: disable plugins you don't need in this project, set disable-model-invocation: true on skills only you trigger, shorten skill descriptions, move rules out of CLAUDE.md into skills (Progressive Disclosure)
  4. Run it again in a new session and compare

What I found in my vault:

  • Each skill listing entry is small, but a hundred of them cost more than many MCP servers
  • Installing a plugin for one skill also loads its agents in every session
  • Memory files show up with their paths, so an imported file that's bigger than expected is easy to spot

One warning: in a long session, /context all mostly tells you that messages dominate. It's most useful at the start of a session, when what you see is pure setup cost: Context Bloat you pay on every request.

That's it for today! ✨

References


About Sébastien

Ready to get to the next level?

Found this valuable? Share it with someone who needs it.

Join 6,000+ readers. Get practical systems for knowledge & AI. Free.

Subscribe ✨

Free: Knowledge System Checklist

A clear roadmap to building your own knowledge system. Subscribe and get it straight to your inbox.

6,000+ readers. No spam. Unsubscribe anytime.

Subscribe