Claude Code Starts at 29,000 Tokens

Part of the Claude Code context window is used up before you type anything. Open a session, type nothing, and a fixed block of tokens is already in the window. It is sent again with every message after that, so you pay for it on every turn rather than once.

Category
Field Note
Published
Updated

We found the size of ours by accident. A long context study we ran through the CLI kept measuring more input tokens than we had asked for, by the same flat amount in every cell, and that gap was the harness. It measured a steady 29,000 tokens across all 128 runs, so our nominal 5,000 token control was really 33,766. This note covers the practical side of that finding.

Short answer

A fresh Claude Code session is never empty: a system prompt, built-in tool definitions, memory files and one description per installed skill load before your first word, and that whole block is resent with every message for the rest of the session. Across 128 runs of our own context rot study the floor measured a steady 29,000 tokens. Keep yours under about 15 percent of the window, and measure at the wire before you start deleting things.

Tree · 9 min read
Chalk illustration of a single figure standing in the one narrow patch of clear floor left in a warehouse stacked wall to wall with crates, the delivery door at the far end still shut
Nothing has been delivered yet. Across 128 runs, the floor of a fresh session measured a steady 29,000 tokens.

What loads into the Claude Code context window before you type?

Four things load before you type: the system prompt Anthropic ships with the CLI, the full schema of every built-in tool, your memory files, and a name plus one line description for each installed skill. Memory files arrive as a user message after the system prompt, and the whole block is resent with each message in the session.

Only some of it is under your control, and the parts you control are not the parts people usually attack first.

ComponentWhat it isWhat controls its size
System promptThe instructions the CLI ships to the model on every requestFeature flags such as disableWorkflows and disableBundledSkills
Built-in toolsRead, Edit, Bash, Task, Workflow and the rest, as full JSON schemaspermissions.deny rules and the disable flags
Memory filesCLAUDE.md at or above your working directory, loaded in full at launchWhat you write, and which directory you launch from
SkillsName and description only, roughly 30 to 100 tokens eachHow many are installed and in scope for that directory
MCP toolsDeferred by default on 4.5 generation models and laterThe ENABLE_TOOL_SEARCH variable, and permissions.deny
Source: Claude Code documentation, memory and MCP pages, August 2026
FIG A

Memory files in the directory hierarchy above your working directory load in full at launch, while files in subdirectories below it load on demand, when Claude reads something in that subdirectory. So the directory you launch from decides how much of that loads up front.

How much startup overhead is normal?

On a 200,000 token window, under 15,000 tokens at startup is lean, 15,000 to 30,000 is normal, and past 50,000 something is loading that you do not use. As a share of the window, keep the startup block under about 15 percent so that most of the window is left for the task itself.

Baseline at startupShare of a 200k windowReading
Under 15,000Under 8 percentLean. Instruction files trimmed, unused features switched off, nothing loaded upfront.
15,000 to 30,0008 to 15 percentNormal, and fine. Our own eval harness sat at about 29,000.
30,000 to 50,00015 to 25 percentWorth an audit. Something loads every session that you use once a month.
Over 50,000Over 25 percentCheck the measurement before you cut. Then cut.
FIG B

We built those bands from three sources. The first is our own 29,000 token floor, measured across 128 CLI runs in the context rot study on a fairly standard setup. Firecrawl's survey of token consumption puts the hidden baseline at 20,000 to 30,000 tokens before you type. Matt Pocock, measuring his own machine at the wire before trimming, logged 69 tools, 154,946 bytes of tool schema and 65,538 real input tokens on a single request.

Both 29,000 and 65,538 are real measurements of a default install plus whatever the owner added. The gap between them is large enough that you cannot know where your own setup falls until you measure it.

Do MCP servers really eat your context window?

They use less than they used to, and less than the built-in report claims. Tool search is on by default for Opus, Sonnet and Haiku 4.5 and later, so MCP tool definitions are deferred until Claude actually needs one and only tool names and server instructions load at startup. Adding another server now has minimal effect.

Of the usual advice about startup overhead, the MCP numbers are the most out of date. The widely quoted figures of 10,000 to 20,000 tokens per server, or 50,000 to 70,000 for a full setup, describe a version of the product where every schema loaded upfront, and on current models that no longer happens. The docs are explicit that tool search defers definitions and that the practical limit is your context budget rather than a per server cap.

The second correction is a measurement artifact. When you run the built-in context report, the CLI prices each tool with its own call to the token counting endpoint. Each of those calls wraps a single schema in a dummy conversation and pays Anthropic's tool use preamble again, roughly 460 tokens of wrapper on a tool whose real schema might be 130 tokens. Iterate that over 60 tools and you pay the preamble 60 times. Async Let measured the difference: about 45,000 tokens summed one at a time, against about 15,000 for the same 60 tools in one real request.

So roughly 30,000 tokens of the reported number can be double counting. The cuts are still worth making, but most of the alarm about MCP overhead describes a problem that has already been fixed.

If you do want them gone, there are two levers. ENABLE_TOOL_SEARCH takes true to always defer, false to always load upfront, and auto:N to load upfront only when the tools fit inside N percent of the window. A deny rule of mcp__* removes every MCP tool without unconfiguring the servers themselves.

How do you measure your own baseline?

You can measure it three ways, in ascending order of trust. The context command gives a category breakdown in one second but over-reports tools, a logging proxy shows the request exactly as the model receives it, and an instructions hook tells you which memory files loaded and why. Use the first to triage and the second to decide.

  • Run /context. It breaks the window into system prompt, tools, memory files and messages, with a token count for each. It is fast and accurate on memory files but inflates the tool count. Write the numbers down before you change anything.
  • Run a logging proxy. Claude Code talks to the API over HTTP, so a proxy between the two can record every request untouched. Pocock's proxy.mjs is one file with no dependencies, and it prints a ranked per-tool table so you cut the specific things you do not use instead of guessing.
  • Add the InstructionsLoaded hook, which logs exactly which instruction files loaded, when and why. This is the one people tend to skip, and it is the only way to catch a CLAUDE.md three directories up that you forgot you wrote.
# point the CLI at a local proxy for one session
node proxy.mjs
ANTHROPIC_BASE_URL=http://localhost:8787 claude

# the proxy prints the real payload, tool by tool
[agent-proxy] 69 tools · 154,946 tool bytes · 65,538 real input tokens
  Workflow      21229 B  ~5307 tok
  DesignSync     8978 B  ~2245 tok
  Monitor        7767 B  ~1942 tok

What should you cut first?

Switch off whole features before individual tools, because each feature brings a cluster of tools and instructions with it. Then trim the memory files, which are the largest thing you wrote yourself. Leave MCP servers for last, after you have confirmed at the wire that they actually cost what the report says.

  1. Record the baseline before you change anything, or you will have no way to tell whether a change helped.
  2. Switch off features you do not use, since one flag removes a whole cluster. disableBundledSkills drops Anthropic's bundled skill catalog while leaving the slash commands typable, and disableWorkflows drops the multi-agent tool, which is usually the single largest schema in the payload.
  3. Deny the individual tools your ranked table says are large and unused, such as the plan mode tools, notebook editing, remote control or scheduling. Keep anything your background jobs depend on.
  4. Trim CLAUDE.md. If a competent engineer could work something out in twenty minutes of reading the repo, cut it. Keep things like a non-obvious build command, a decision that goes against the framework default, or a constraint nobody would guess.
  5. Move what is left out of the always-loaded path. Path-scoped rules under .claude/rules/ and skills both load on demand. A skill costs 30 to 100 tokens at startup and its body loads only when it is relevant.
  6. Only then look at MCP: confirm the real cost at the wire, then disconnect the servers you are not using this session.
{
  "disableBundledSkills": true,
  "disableWorkflows": true,
  "disableRemoteControl": true,
  "permissions": {
    "deny": ["NotebookEdit", "CronCreate", "CronList", "CronDelete"]
  }
}

Pick from that config rather than copying it whole. The reason to look at your own payload first is so that you cut what you personally do not use, and if you work in plan mode, keep plan mode.

What are the less obvious ways to lower the baseline?

The less obvious ways are structural: replacing servers with command line tools, launching sessions in the right directory, auditing the context you inject into yourself, and turning standing prose rules into gates that cost nothing until they fire. These save more than the standard advice of trimming files and disconnecting servers.

  • Replace MCP servers with CLIs. A GitHub MCP server ships tool schemas, while the gh command ships none, because the model already knows it and reads its help text only when it needs to. Any service with a good CLI is a server you can delete outright rather than defer.
  • Launch the session in the right directory. Every CLAUDE.md at or above your working directory loads in full at launch. Start in the package you are working on rather than the monorepo root, and the parent instructions you do not need never arrive.
  • Audit the context you inject into yourself. Session start hooks and plugins can push their own text into every session, and it is easy to install a helper that spends a thousand tokens telling you how to save tokens. Read your own hook output as if a stranger wrote it.
  • Turn standing rules into gates. A line in CLAUDE.md that says always run the tests is paid for in every message of every session and is still only advisory. The same rule as a pre-commit hook or a CI check costs zero tokens until it fires, and it is deterministic.
  • Price each tool per month rather than per session. A server that costs 5,000 tokens at startup, across 40 sessions a month, for 3 actual uses, is 200,000 tokens for 3 calls, and very few servers justify their cost once you do that arithmetic.
  • Send exploration to a subagent. A subagent gets its own window, and only its conclusion comes back. Reading nine files to answer one question should not happen in the context you need for the next hour of work.
  • Ablate rather than rewrite. To shrink an instruction file, delete a rule, run the same task, and see whether behavior changes. Rewording a rule only tests the prose, while deleting it tells you whether the rule was doing anything.

When is a lean baseline not worth chasing?

It is not worth chasing when you are optimizing for accuracy rather than cost. Our own recall testing found retention holding out to 730,000 tokens, so a large startup block does not by itself make the model less accurate. What it costs is money, prompt cache stability and the room you have left for the real work.

Taken too far, this exercise makes your setup worse. If you strip tools you actually use, you spend the first ten minutes of every session working around their absence. What degrades in long sessions is composition rather than recall, and having fewer tools does not help composition.

If you are billed through the API, note that connecting or disconnecting an MCP server mid-session invalidates the prompt cache for the whole session, so make those changes when the session starts.

Common Questions

How many tokens does Claude Code use before I type anything?
On a fairly standard setup, 20,000 to 30,000. We measured a steady 29,000 across 128 runs of our own long context study, and independent surveys land in the same band. A heavily extended install measured at the wire can reach 65,000 or more, so the only way to know your own number is to measure it.
Do MCP servers still use 50,000 tokens of context?
Not on current models. Tool search is enabled by default on Opus, Sonnet and Haiku 4.5 and later, so MCP tool definitions are deferred until needed and only names and server instructions load at startup. The large figures still circulating describe an older loading behavior, and they are further inflated by how the built-in report counts tools.
Why does /context show a bigger MCP number than my actual request?
Because it prices tools one at a time. Each tool gets its own token counting call, and every call re-pays the tool use preamble and a wrapper of roughly 460 tokens. Sixty tools counted separately can read about 45,000 tokens where the same sixty in one real request cost about 15,000.
How long should CLAUDE.md be?
Anthropic's guidance is under 200 lines, and every line should be worth paying for in every message of the session. For each line, ask whether a competent engineer could work the same thing out from the repo in twenty minutes, and cut it if so. Move anything you still want to keep into a skill or a path-scoped rule, which load on demand.
Does deleting CLAUDE.md make Claude Code better?
It makes the session cheaper and it removes instructions that were never guaranteed to be followed. Memory files are delivered as a user message rather than as part of the system prompt, so compliance was always best effort. If a rule has to hold every time, a hook enforces it and costs nothing until it runs.
What is the fastest single change that lowers the baseline?
Switching off a whole feature rather than individual tools. One flag removes a cluster of tools and their instructions together, and the multi-agent workflow tool is often the single largest schema in the payload. Measure the baseline, apply one flag, and measure again.

Sources

SourcePublisherLink
Connect Claude Code to tools via MCPClaude Code documentation, Anthropiccode.claude.com
How Claude remembers your projectClaude Code documentation, Anthropiccode.claude.com
Manage costs effectivelyClaude Code documentation, Anthropiccode.claude.com
Extend Claude with skillsClaude Code documentation, Anthropiccode.claude.com
How To Kill The Bloat In Claude Code's System PromptMatt Pocock, AI Herowww.aihero.dev
Do MCP Servers Really Eat Half Your Context Window?Async Letwww.async-let.com
12 Ways to Cut Token Consumption in Claude CodeFirecrawlwww.firecrawl.dev
Tool use with Claude: overviewClaude Developer Platform, Anthropicplatform.claude.com

Questions to explore next

  • What is the smallest baseline a usable Claude Code session can run at?
  • How much of the startup block survives a prompt cache hit, and what does that change about the cost?
  • Does a leaner tool set measurably improve tool selection accuracy, or only cost?
  • Which standing instructions actually change behaviour when you ablate them one at a time?

Keep Exploring

Chalk stick figure in a hard hat presenting a little machine of blue gears it just built

Name the slow step.
We’ll build the system.

Building What's Next.