skip to content

In Claude Code, what already fills the context window before your first prompt, and how does /context show it?

level: middleimportance: should knowfreq 14%

answer

  1. the window is not empty
  2. instructions, memory, listings
  3. names now, bodies later
  4. a grid by category

basics

~20 s

Before the first prompt Claude Code loads the system prompt, environment details, every applicable CLAUDE.md, the start of auto memory, skill descriptions and MCP tool names. /context shows usage by category, the files that loaded and suggestions to cut it.

solid answer

~50 s

A new Claude Code conversation is never empty. Before you type, it holds the system prompt (plus an output style's instructions or `--append-system-prompt` text if you use them), environment and git details, the full text of managed, user and project CLAUDE.md files (nested subdirectory ones wait until Claude reads files there), the first 200 lines or 25KB of auto memory's `MEMORY.md`, a listing of skill names and descriptions capped at about 1% of the window, and MCP tool names with server instructions, while full tool schemas wait for tool search. Skills with `disable-model-invocation: true` stay out of the listing. Running `/context` draws current usage as a colored grid by category, lists which CLAUDE.md and auto memory files loaded, and suggests fixes for context-heavy tools, memory bloat and capacity. `/context all` expands the per-item breakdown, such as each MCP tool's tokens.

go deeper

for a junior

Recall that a new session already holds the system prompt, CLAUDE.md, auto memory and skill and MCP listings, and that /context is the command that shows what fills the window.

for a middle

Explain the names-now, bodies-later pattern: skill descriptions under a 1% budget, MCP names with deferred schemas, the 200-line or 25KB auto memory cut, and rules that load with matching files.

for a senior

Use /context to diagnose a crowded session: confirm which CLAUDE.md files loaded, spot heavy MCP tools with /context all, and pick the cheapest lever, such as path-scoped rules or disable-model-invocation.

for a principal

Treat the startup layers as a fixed cost every request pays for a whole team, and weigh shared CLAUDE.md growth and plugin-installed skills against attention and window space.

## The window starts partly full A **context window** is everything the model sees on a request. In Claude Code a fresh conversation already carries several layers before your first prompt, and they are resent on every request. Knowing them explains why a session can feel crowded early and where trimming pays off. ## What loads at startup | Layer | What loads | Notes | |---|---|---| | System prompt | Core instructions for behaviour, tools and formatting | You never see it; an output style or `--append-system-prompt` adds to it | | Environment | Working directory, platform, shell, OS, git repo status | Git branch, status and recent commits arrive as a separate block | | CLAUDE.md files | Full content of managed, user and project files | Files from the working directory up to the root load now; nested subdirectory files load later, when Claude reads files there | | Auto memory | First 200 lines or 25KB of `MEMORY.md`, whichever comes first | Content past that point is not loaded at startup | | Skill listing | Names and descriptions of skills Claude may invoke | Bodies load only when a skill is used | | MCP | Tool names and server instructions | Full JSON schemas are deferred until Claude needs a tool | AGENTS.md files can load at this stage too, on their own or next to CLAUDE.md. ## The on-demand layers and their limits Several mechanisms deliberately load **names now and bodies later**: - **Skills.** The listing is capped at a share of the window set by `skillListingBudgetFraction`, default `0.01`, meaning 1%. When it overflows, every skill name stays but descriptions of the least-used skills are dropped, so Claude is less likely to pick those skills on its own. A skill with `disable-model-invocation: true` is not listed at all and costs nothing until you type `/name`. - **MCP tools.** Tool search is on by default, so only tool names and server instructions load; a schema loads when Claude needs that tool. Some setups load schemas upfront instead, for example when `ANTHROPIC_BASE_URL` points to a non-first-party host, and `ENABLE_TOOL_SEARCH=auto` loads them upfront when they fit within 10% of the window. - **Path-scoped rules and nested CLAUDE.md files** join the conversation when Claude reads a matching file, not at startup. - **Hooks** cost nothing unless a hook returns additional context. - **Subagents** read files in their own window; only the final report returns to yours. ## Reading `/context` `/context` is the live view. It shows: 1. a **colored grid** of current usage by category, such as messages, skills, MCP tools and free space; 2. **which CLAUDE.md and auto memory files loaded**, so you can confirm a file is actually in play; 3. **optimization suggestions** for context-heavy tools, memory bloat and capacity warnings; 4. a **warning** when the conversation exceeds the window, saying how far over it is and which command frees space. The Skills row reports the listing after the budget is applied, so it matches what the model receives. In fullscreen mode the per-item breakdown is collapsed to keep the grid visible; `/context all` expands it, which is how you see how many tokens each loaded MCP tool uses. `/memory` then opens the CLAUDE.md and memory files the view listed, so you can edit them. ## Using it to trim Once `/context` shows the heavy layers, the usual levers are: - keep each CLAUDE.md file short (the docs target under 200 lines) and move guidance for one part of the codebase into path-scoped rules; - mark manual-only skills `disable-model-invocation: true`, or list low-priority ones as `"name-only"` in `skillOverrides`; - disconnect MCP servers you are not using; - send large exploratory reads to a subagent instead of the main window. ## A five-minute audit 1. Start a fresh conversation and run `/context` before typing anything, so the grid shows only the startup layers. 2. Check the memory-file list: a CLAUDE.md you expected but do not see is not being read, and one you did not expect is costing space. 3. Run `/context all` and sort out MCP tools or skills that are large but unused in this repository. 4. Repeat after an hour of work to see how much the messages category has grown relative to the fixed layers. The point is not a small number for its own sake. Everything in the window competes for the model's attention, and the startup layers are paid on every request for the whole session.

  • Why can a Claude Code skill stop being chosen automatically once a team installs many skills, even though its name still appears?
    The skill listing is capped at a share of the window, `skillListingBudgetFraction` (default `0.01`). Past the cap Claude Code keeps every name but drops descriptions of the least-used skills, so Claude has no keywords to match. Raise the fraction, set `SLASH_COMMAND_TOOL_CHAR_BUDGET`, or mark low-priority skills `"name-only"` in `skillOverrides`.
  • Does connecting many MCP servers to Claude Code fill the window with tool schemas?
    Not by default. Tool search defers schemas, so only tool names and server instructions load and a schema loads when Claude needs that tool. The exceptions include an `ANTHROPIC_BASE_URL` pointing to a non-first-party host, where tools load upfront unless `ENABLE_TOOL_SEARCH=true`, and `ENABLE_TOOL_SEARCH=auto`, which loads upfront when the definitions fit in 10% of the window.

  • Claude Code loads nothing until you type, so a new window starts empty
  • Every MCP tool's full JSON schema loads at startup by default
  • Auto memory loads the whole MEMORY.md however long it grows
  • Every installed skill's full SKILL.md body is in context from the start
  • Hooks add their output to the context on every tool call