How to make Claude Code lighter and faster (context, cache, subagents, tools)
What really cuts usage and context in Claude Code: measuring with /usage, CLAUDE.md, MCP versus CLI, trimming tool output, subagents, plugins and the cache.
Measure first: on a subscription plan /usage shows what share of usage goes to skills, subagents, plugins and each MCP server c1. Optimising without it is guesswork.
The largest cost is usually the Claude Code harness itself, not the task. In the TokenSave measurement on a simple task the subagent was the most expensive route: +578% input tokens c2. Installed plugins cost tokens even when none was used c3. A subagent pays off on a large, noisy task, not on a small one.
Claims
In our words
In the source's words
On a plan, /usage shows the share of usage that goes to skills, subagents, plugins and MCP servers.
recent usage attributed to skills, subagents, plugins, and individual MCP servers, each shown as a percentage of the total.
code.claude.com · T1
A subagent is the most expensive way to do a small task: +578% input tokens.
A subagent is the most expensive way to do a small task: 534,125 input tokens (+578%)
doi.org · T2
Installed plugins cost tokens even when they are not used.
Installed plugins cost tokens even when unused.
doi.org · T2
Anthropic recommends keeping CLAUDE.md under 200 lines.
Aim to keep CLAUDE.md under 200 lines by including only essentials
code.claude.com · T1
CLI tools are more context-efficient than MCP servers.
are still more context-efficient than MCP servers because they don’t add any per-tool listing.
code.claude.com · T1
A hook can cut a long log down to its errors alone, from tens of thousands of tokens to hundreds.
Instead of Claude reading a 10,000-line log file to find errors, a hook can grep for `ERROR` and return only matching lines, reducing context from tens of thousands of tokens to hundreds.
code.claude.com · T1
The first message after a pause longer than the cache lifetime reprocesses the whole context.
misses the cache and reprocesses your full context
code.claude.com · T1
A Compact instructions section in CLAUDE.md tells compaction what to keep.
When you are using compact, please focus on test output and code changes
code.claude.com · T1