← Back to UsageCut

How to reduce Claude Code's context window usage

Reducing Claude Code's context window usage is not about typing less. It is about controlling what accumulates in the conversation, because every turn re-sends the whole thing. Here are the levers that actually work, ordered by how much they move - and every one is lossless or reversible.

1. Offload heavy exploration to subagents

This is the biggest lever by far. Reads, greps, and Bash output that never lead to an edit still get re-charged as cache reads on every later turn - so a single big exploration keeps costing you for the rest of the session. Moving that digging into a subagent, and keeping only a short summary in the main thread, removes the compounding cost. Modeled at about 22% of the main-thread footprint.

2. Slim your CLAUDE.md

The global header loads on every session. In the measured setup that was about 6,344 tokens every time, and roughly two-thirds of it was conditional workflow instructions that only matter in specific situations. Move that conditional content to path-scoped rules (.claude/rules/*.md with paths: frontmatter) or plain "read X when needed" pointers. Modeled at about 11% of footprint.

Do not use @import to split it - imported files still load fully, so the saving is zero. The win only comes from content that loads on demand.

3. Turn on deferred tool loading

Flip the setting so MCP tool schemas load only when a tool is actually needed, instead of every schema entering context up front. Worth roughly 2-5K tokens per session when you have several MCP servers connected.

4. Disable MCP servers you never call

Each connected server injects its tool definitions into every session. In the measured setup, 6 of 14 servers were never called. Disabling the genuinely dead ones is lossless and reversible. The caveat: a server may be used only inside a subagent, so check subagent transcripts before calling one dead.

5. Let a live trimmer collapse bulky output

Tool output is the largest growing part of context - about 2.32M tokens total in the sample, dominated by file reads and Bash. A trimmer that losslessly collapses repeated lines, strips junk, and dedupes re-reads as output appears touches only new output and never the cached prefix, so it stays cache-safe.

How much is realistic

Stacked, the modeled band is about 39-47% more session longevity and 18-22% lower dollar cost, on a measured floor of about 0.5%. It is a range, not a promise - your setup decides where you land. To see which levers apply to you, and by how much, measure what your sessions actually use first.

See your own numbers

These are aggregates from real sessions. Your setup is different - run the free scan and get the breakdown for your own Claude Code history. It runs locally; nothing about your code or prompts leaves your machine.

npx usagecutRun a free scan →

NeoMade by Neo

UsageCut by ClockedCode - not affiliated with Anthropic. The figures on this page are measured on real Claude Code sessions and labeled measured or estimated where it matters.