2. Context
"The context window is everything Claude sees on each request: the system prompt, tool definitions, CLAUDE.md and memory, skill descriptions, and the whole conversation, including every file it has read. It fills as you work, and Claude gets worse as it fills. /context shows what is in it right now, as a colored grid by category with suggestions. It is the first thing I run when Claude 'forgot' something or a CLAUDE.md seems ignored. If it isn't in /context, it isn't loaded."
The architect's addition: every request resends that whole window, so context is also the main driver of cost and speed, not just of quality.
7 pictures, in order.
Use the arrow keys or the dots. Tap a picture to see it full size.
The facts someone can check.
What the grid breaks down
| Category | What's in it |
|---|---|
| System prompt | Claude Code's core instructions, plus your output style |
| System tools | The built-in tools: read, edit, run commands, search |
| MCP tools | Tool names and server instructions. Full schemas only once a tool is used |
| Custom agents | Your subagent definitions, each with the source it loaded from |
| Memory files | CLAUDE.md files, unscoped rules, the auto memory index |
| Skills | The skill listing, bundled skills included |
| Messages | The conversation: prompts, replies, file reads, command output |
/context all expands the per-item breakdown, which fullscreen mode collapses to keep the grid on screen. It also shows the token cost of each MCP tool.
When things enter the window
- Before you type: the system prompt and tools, CLAUDE.md (or AGENTS.md in its place), the auto memory index, MCP tool names, skill descriptions, and any output style.
- As Claude works: every file read, path-scoped rules next to a matching file, a subfolder's CLAUDE.md the first time Claude touches that folder, and anything a hook returns.
- Through a subagent: the subagent reads in its own window. Only its summary and a small metadata trailer come back, which is why "use a subagent to investigate" is the standard advice for big reads.
- On its own: Claude Code adds system reminders next to your messages, including your CLAUDE.md files, a note when a file it read changes on disk, and the commit and PR attribution lines. If Claude follows a rule nobody wrote, look there.
What each feature costs
| Feature | When it loads | Cost |
|---|---|---|
| CLAUDE.md, output style | Session start | Every request |
| Skills | Descriptions at start, body on use | Low: descriptions every request |
| MCP servers | Names at start, schemas on use | Low until a tool is used |
| Subagents | When spawned | Isolated from your window |
| Hooks | On trigger | Zero, unless a hook returns context |
A skill with disable-model-invocation: true keeps even its description out of context until you invoke it.
The numbers
- 1M tokens by default on the Fable models, Sonnet 5 and later, Haiku 5.5, and Opus 4.7 and later. 200K on Opus 4.6 and Sonnet 4.6 unless you pick the
[1m]variant, or on any model withCLAUDE_CODE_DISABLE_1M_CONTEXT=1. - A native 1M session auto-compacts at about 967K tokens by default. Module 3 covers how to move that.
- The skill listing gets 1% of the window by default (
skillListingBudgetFraction: 0.01). Over budget, the least-used skills lose their descriptions first. Each entry is cut at 1,536 characters. - MCP server instructions and upfront tool descriptions are cut at 4,096 characters. A tool found through tool search keeps up to 16,384.
Which command answers which question
/context is the overview. /memory edits memory files, /skills, /mcp, /hooks and /permissions each show one category in detail, /status shows which settings sources are active, and /usage (alias /cost) shows what the session has cost.
When the window is full
/context warns in two different ways. "Context exceeds the 200k-token limit" means requests are failing until you free space. "Past the compaction window" means you passed a compaction point that sits below the real window, so requests can still succeed. If the window keeps filling even after /clear, compare the Messages row with the rows above it. If Messages is biggest, a file or tool output is the problem. If the other rows add up to more, your startup load is too big: disable unused MCP servers, trim CLAUDE.md, move workflows into skills.
Why this is also a cost conversation
Every request resends the whole window. Prompt caching makes the unchanged part cheap, but a session open all day still draws usage for its whole history on every message. This is also why an edit to CLAUDE.md doesn't apply mid-session: the file is read once at session start, and the new content loads on the next /clear, /compact, or restart.
Answer out loud, then flip the card.
Mark each one honestly. Cards you miss stay flagged for review, in this browser.
A customer says "Claude ignores our CLAUDE.md." What's your first move?
Run /context and look under Memory files. If the file isn't there, it didn't load: check where it lives (a subfolder CLAUDE.md loads only when Claude touches that folder) and whether an AGENTS.md setup is in play. If it is there, the problem is the writing, not the loading: vague lines, two files that conflict, or a file so long that rules get lost. And if the rule must never be broken, it belongs in a permission rule or a hook, not CLAUDE.md.
"We want to connect 30 MCP servers. Will that eat our context?"
Much less than they fear. Tool search is on by default, so only tool names and server instructions load at start, and a tool's full schema loads only when Claude uses it. /context all shows the per-tool cost, and /mcp disables servers nobody uses. Two caveats worth naming: where tool search is off, all tools load upfront, and a CLI such as gh is still cheaper than an MCP server because it adds no tool listing at all.
"We're on a 1M-token model. Why manage context at all?"
Three reasons. Claude's performance degrades as any window fills, so a 1M window full of stale work is worse than a lean one. Every request resends the whole conversation, so a big window is a big bill. And the session still compacts automatically around 967K. The habit is the same at any size: /clear between unrelated tasks, and send big reads to subagents.
"We have over a hundred skills and Claude keeps picking the wrong one." What's happening?
The skill listing is capped at 1% of the context window by default. When it overflows, the least-used skills lose their descriptions, so Claude can't match them. Fixes: put the key use case first in each description (entries are cut at 1,536 characters), set disable-model-invocation: true on skills people only run by hand, set low-priority skills to name-only in skillOverrides, or raise skillListingBudgetFraction. /skill-doctor shows what each skill costs and how often it's used.
A developer edits CLAUDE.md mid-session and Claude keeps doing the old thing. Bug?
No. Project and user CLAUDE.md files are read once at session start and held for the session, which keeps the prompt cache intact. The edit applies after /clear, /compact, or a restart.
"/context says we're over a 200K limit, but we're on a 1M model."
Read which warning it is. "Past the 200k-token compaction window" means a compaction point sits at 200K, and requests can still succeed. If requests are actually failing near 200K, likely causes are CLAUDE_CODE_DISABLE_1M_CONTEXT=1 being set, or a gateway alias Claude Code doesn't recognize, which it assumes is a 200K model. The fix for the second is to give Claude Code the model's real window, which the model configuration page covers.
Where does a subagent's work go, context-wise?
Into its own window. Its file reads and tool calls stay there, and only a summary and a small metadata trailer come back to the main conversation. It still sends its own requests, so it counts toward usage limits. A fork is the exception on the input side: it starts with a copy of the conversation so far.
"Claude adds a Co-Authored-By line to commits and nobody asked it to." Where did that come from?
From context Claude Code adds on its own. Alongside your messages it adds system reminders, including the commit and pull request attribution lines. Change or remove them with the attribution setting. Setting includeGitInstructions to false removes Claude Code's built-in commit and PR instructions.
Wrong answers that sound right.
Before you tap, say why each one is wrong.
Three moves in a fresh project.
Facts checked against code.claude.com/docs/en/context-window, commands, debug-your-config, features-overview, model-config, skills, mcp, prompt-caching, costs, errors, troubleshooting, how-claude-code-works and best-practices on 2026-10-25. Claude Code ships fast: confirm anything that matters against the official docs.