Retrieved article excerpt
Open article Β· Retrieved 2026-10-16T19:14:02.254109+00:00
# context-tax
**What Claude Code sends on every turn before you type a word: what it costs, which of it you never
used, and which of it never reached your agent at all.**
[npm](https://www.npmjs.com/package/context-tax)
[CI](https://github.com/gethrbr/context-tax/actions/workflows/ci.yml)
[dependencies](https://github.com/gethrbr/context-tax#zero-dependencies-and-a-test-that-proves-it)
[node](https://nodejs.org)
[license](https://github.com/gethrbr/context-tax/blob/main/LICENSE)
[Mentioned in Awesome Claude Code](https://github.com/hesreallyhim/awesome-claude-code)
```
npx context-tax
```
**For [Claude Code](https://claude.com/claude-code).**
---
Every article about MCP context bloat ends with the same advice: **audit which tools your agent
actually calls, and prune the rest.** None of them automate that sentence. They tell you to do it by
hand.
This does it for you. Your session transcripts already record what Claude Code sent to the model, so
it reads that instead of guessing: the skill listing as it went out, the tool names, your instruction
files, the client's own tools. It reads the same transcripts for what you actually called, and
multiplies.
No install, no account, no sign-up, no telemetry, no LLM call, and no `context-tax` server for
anything to be sent to.
| | |
| --- | --- |
| **Read, not modelled** | Rows come from what a recent session sent, measured on the text itself. The per-turn total comes from the `usage` your API calls were billed on |
| **What your agent never received** | Past its budget, Claude Code sends a skill as a bare name with no description. This counts them, says whose they are, and prices sending them all |
| **Cost per *use*, not per turn** | A 400-token server used once in 96 sessions cost you 17M tokens, and that is the number that changes minds |
| **It writes the fix** | `context-tax fix` routes each finding to the lever that actually turns that thing off |
| **Two screens made to be shared** | A [receipt](https://github.com/gethrbr/context-tax#the-receipt) and a [picture of one session](https://github.com/gethrbr/context-tax#one-session-as-a-picture), with no server name, skill name or path on either |
| **Zero runtime dependencies** | Not "few". None. [Asserted by a test](https://github.com/gethrbr/context-tax#zero-dependencies-and-a-test-that-proves-it) against the import graph |
## Contents
- [The report](https://github.com/gethrbr/context-tax#the-report)
- [Reading the table](https://github.com/gethrbr/context-tax#reading-the-table)
- [What your agent never received](https://github.com/gethrbr/context-tax#what-your-agent-never-received)
- [The receipt](https://github.com/gethrbr/context-tax#the-receipt)
- [One session as a picture](https://github.com/gethrbr/context-tax#one-session-as-a-picture)
- [`context-tax fix`](https://github.com/gethrbr/context-tax#context-tax-fix)
- [Commands and flags](https://github.com/gethrbr/context-tax#commands-and-flags)
- [How it works](https://github.com/gethrbr/context-tax#how-it-works)
- [Why the numbers are trustworthy](https://github.com/gethrbr/context-tax#why-the-numbers-are-trustworthy)
- [Privacy](https://github.com/gethrbr/context-tax#privacy)
- [Use it as a library](https://github.com/gethrbr/context-tax#use-it-as-a-library)
- [FAQ](https://github.com/gethrbr/context-tax#faq)
- [Development](https://github.com/gethrbr/context-tax#development)
## The report
Note
Every number and name below is **fabricated for illustration**, on an invented config. The screens
are real renderer output, generated from a fixture, so the docs cannot drift from the code. Run
`npx context-tax` to see your own.
```
context-tax ~/projects/storefront
on this machine: 96 sessions, 42,900 turns, 1.7B tokens of context carried.
You typed /clear 118, /compact 31.
40,000 tokens on every turn, 20% of a window of about 200,000, before you type
a word. 1,900 of them are recoverable from the 8 findings below.
βββββββββββββββββββββββββ¬βββββββββββ¬ββββββββββββ¬βββββββββ¬βββββββββ¬ββββββββββββ
β MCP SERVERS β tokens β deferred β share β calls β per call β
βββββββββββββββββββββββββΌβββββββββββΌββββββββββββΌβββββββββΌβββββββββΌββββββββββββ€
β figma β 300 β +1,110 β 1% β 0 β - β
β github β 700 β +3,680 β 2% β 214 β 140K β
β linear β 300 β +2,540 β 1% β 3 β 4.3M β
β postgres β - β - β - β 0 β - β
β sentry β 400 β +6,300 β 1% β 1 β 17M β
β claude_ai_Notion β 900 β - β 2% β 2 β 19M β
βββββββββββββββββββββββββΌβββββββββββΌββββββββββββΌβββββββββΌβββββββββΌββββββββββββ€
β 31 skills β 2,000 β - β 5% β 1 β - β
β 11 agents β 2,400 β - β 6% β - β - β
β 2 memory files β 1,600 β - β 4% β - β - β
β your hooks β 400 β - β 1% β - β - β
βββββββββββββββββββββββββΌβββββββββββΌββββββββββββΌβββββββββΌβββββββββΌββββββββββββ€
β CLAUDE CODE ITSELF β β β β β β
β its 14 tools β 22,000 β - β 55% β - β - β
β its system prompt β 3,200 β - β 8% β - β - β
β its tool name list β 400 β - β 1% β - β - β
β its session details β 600 β - β 2% β - β - β
βββββββββββββββββββββββββΌβββββββββββΌββββββββββββΌβββββββββΌβββββββββΌββββββββββββ€
β unattributed β 4,800 β β 12% β β β
β EVERY TURN β 40,000 β β 100% β β β
βββββββββββββββββββββββββ΄βββββββββββ΄ββββββββββββ΄βββββββββ΄βββββββββ΄ββββββββββββ
postgres: configured but off, so nothing was started to measure
31 skills: as sent in your session of 2026-09-01: 9 skills went as a name
with no description, because Claude Code caps this listing at about 8,000
characters, its share of a window of about 200,000 tokens
11 agents: agent listings are not separable from the prompt
2 memory files: the model reads these, it does not call them, so no log
can say which lines were used
your hooks: what your hooks put in front of the first turn. A hook that
adds context on every prompt adds this much again each time
its 14 tools: sent by Claude Code itself on every turn. A permissions.deny
rule takes one out of what is sent
its system prompt, its tool name list, its session details: sent by Claude
Code itself on every turn, so there is nothing here to switch off
EVERY TURN is exact, from usage. Median first request across your 10 most
recent sessions, 2026-08-24 to 2026-09-01.
Rows are what your session of 2026-09-01 sent, read from its transcript. A
row that says otherwise was weighed from your config.
token counts are chars/4, measured within 4%; a server's schemas are counted
whole, which is what you pay only if your client does not defer them.
tokens: what every turn carries. deferred: the schemas behind it, paid when
something loads them.
FINDINGS
1. 9 of your 31 skills reach the model as a name with no description
design-kit 7 of 12, your own 2 of 14 (release-notes, db-migrate). A bare
name gives the model nothing to choose a skill by. The cap is about 8,000
characters and yours needs about 11,640. From your session of 2026-09-01;
who loses out shifts with recent use.
fix: set skillListingBudgetFraction to 0.015 and every description is
sent, for about 910 more tokens on every turn (context-tax fix
--restore-descriptions writes it). Or make room: each skill switched off
below hands its space to another description
2. figma costs 300 tokens every turn and has never been called
0 calls in 96 sessions since it was configured. Loading its schemas costs
1,110 tokens more, every time something does.
fix: add "figma" to disabledMcpjsonServers in
~/projects/storefront/.claude/settings.local.json
3. github: 9 of its 26 tools have never been called
create_gist, delete_file, fork_repo, list_gists, ... Their names and
descriptions cost 415 tokens on every turn, and 1,102 tokens of schema
you have never used waits behind them.
fix: MCP has no per-tool switch. Ask the server for a narrower tool set,
or drop the server.
4. linear is loaded on every turn and used in 3 of 96 sessions on this
machine
300 tokens re-sent across 42,900 turns for 3 calls: 4,290,000 tokens of
standing cost per use, counted over every session on record because
nothing says when this was added, so read it as an upper bound. Loading
its schemas costs 2,540 tokens more, every time something does.
fix: claude mcp remove linear -s user
5. sentry is loaded on every turn and used in 1 of 96 sessions
400 tokens re-sent across 42,900 turns for 1 call: 17,160,000 tokens of
standing cost per use. Loading its schemas costs 6,300 tokens more, every
time something does.
fix: add "sentry" to disabledMcpjsonServers in
~/projects/storefront/.claude/settings.local.json
6. claude_ai_Notion is sent on every turn and used in 2 of 96 sessions on
this machine
900 tokens of tool names and instructions across 42,900 turns for 2
calls. No file on this machine declares it, so its age is unknown and the
per-call figure is an upper bound.
fix: no file here declares it, so there is nothing for this tool to edit.
/mcp in a session shows where it is connected from, and a claude.ai
connector is switched off in your claude.ai settings
7. 13 skills never invoked, either way
The listing is over its budget, so most of what this frees goes to
another description rather than out of the prompt. changelog-writer,
commit-helper, db-migrate, ...
fix: set each to off in skillOverrides, or delete the ones you do not
recognise
8. 2 of Claude Code's own tools are 4,300 tokens and used in under 1 session
in 20
Workflow 2,300, 2 of 96 (multi-agent workflows); ScheduleWakeup 2,000, 1
of 96 (/loop without an interval)
fix: context-tax fix --level lean denies them, for 4,300 fewer tokens on
every turn. Each stops working until you take its rule out of
permissions.deny
NOT MEASURABLE HERE
Your memory and instruction files are 1,600 tokens of every turn. This tool
can tell you what they cost. It cannot tell you which of the instructions
inside them your agent actually used. Nothing in a log can: that needs the
model's attention, not your history.
MCP connectors attached to your claude.ai account appear in no file on this
machine. The ones your session connected are rows above, read from what it
sent.
1,900 tokens per turn recoverable from the findings above.
context-tax measure what each line weighs, and how
context-tax config what is loaded, and from where
```
## Reading the table
**The first line is the whole report in one sentence.**
How much is sent before you type, what share of your window that is, and how much of it you can get
back. The share is only printed when a session proves the window it is a share of. Without one there
is no percentage at all, because a percentage of an assumed window is a guess wearing a decimal point.
**`per call` is the column that changes behaviour.**
A total makes people shrug, because every total looks like the cost of doing business. Cost per use
reads as a bill. The `sentry` row is not expensive because 400 tokens is a lot. It is expensive
because those 400 tokens were re-sent on