Home / Blog / Claude Code token cost explorer news update
Tech News

Claude Code token cost explorer news update

A local context cost explorer reads a 26.6 mb Claude Code session locally, and cache rebuilds added 36% while one instruction block was 8.2% of a subagent.

By Dillip Chowdary • Nov 10, 2026 • Source: entropicthoughts.com

Claude Code token cost explorer news update

The source is a personal cost-explorer walkthrough, so I'll match its section order and use only figures and commands that appear in that text.Claude Code's /context command breaks down token usage for the main conversation only, so subagents make a session harder to diagnose, and neither ccusage nor claude-agent-ledger gave the split needed to tune that usage. The author had Claude Code build a local context cost explorer in about 30 minutes, including a little UI polish, and calls the barely reviewed result vibecoded but acceptable because it is not critical infrastructure and because Anthropic is likely to change the jsonl session-transcript format soon. The walkthrough is in entropicthoughts.com's report.

This piece follows that explorer through one transcript for people who run Claude Code with subagents and want to see which instructions, tool calls, and thinking blocks consume the plan. It moves from a local file load and the session flame graph to a per-agent plot, token-type and turn-by-turn views, and the top 40 context entries. The same /context gap is technically true of Pi, though the author has not had the same cost issues there, and Emacs Agent Shell, open-weight models, and privacy-friendly inference providers are left for another time.

01Local browser load for one session

The context cost explorer opens in the browser and keeps the diagnosis on the machine, so transcript data does not leave the computer. A reader can open the network tab, load a non-sensitive session, and confirm that nothing is sent off the page. Firefox warns when a page is allowed to read local files, which the author treats as expected because that read still stays on the page.

The tool accepts one session file or a whole Claude Code project directory, and a directory load auto-discovers every session before asking for a single selection. Aggregation across sessions was left out because the author had no demand for it. The example clicks the November 6 session, listed at 26.6 mb.

02Session overview and cache rebuilds

The session screen opens on a cost overview whose top figures the author mostly skips, because their significance is unclear. A 36% extra cost from cache rebuilds still stands out as large. Prompt caching is something the author has not read about, so that 36% stays an observed surcharge, while the author calls the flame graph "great for getting a rough picture of where resources are spent."

The author thanks Brendan Gregg for inventing flame graphs and calls them underrated outside ordinary performance work. The graph already makes some of this session's spending obvious. The tour then leaves that static picture for a timeline of agents, token types, and individual entries in the same November 6 transcript.

03Per-agent plot and instruction rows

Claude Code token cost explorer news update
Illustration · Pexels

A short scroll reaches cumulative token usage for the session, counting the main conversation and every subagent, with darker shades where an agent contributed more of the cost relative to all activity then. Blue was among the most expensive subagents, followed by orange. Green, the agent examined next, was mostly active early and idle around 9 pm.

Under the plot, an agent table can expand the initial instruction each row received, from the human in the main conversation or from the orchestrating agent for a subagent. The reader clicks the row to open that agent's detail. The green row is the one used for the cost and context plots that follow.

Advertisement

Tech Pulse Daily

Get tomorrow's pulse first

Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.

04Cumulative cost and turn size

The detail view plots cumulative cost by token kind and runs until about 9 pm, matching the moment that subagent was spun down. Most of the cost, shown as solid shading, lands at the end of the timeline, because later turns get more expensive as context grows. The author believes, with an explicit chance of being mistaken, that conversation cost grows quadratically with the number of turns.

Compaction is one of the few ways the window shrinks, and the next plot shows context size in tokens at each turn, a number that can fall when compaction runs. Token usage climbs most early, while cumulative cost climbs most late. The author calls the Bash tool call "hands-down the largest producer of tokens" in this conversation, especially early, and those early tokens cost more because they remain on every later turn.

05Top 40 entries kept in context

Individual entries that drive tokens and cost are listed forty deep, and summarised tool calls expand to the command and its output. The initial instruction block is nearly 25,000 tokens, written once, and kept for all 193 turns. That single block is 8.2% of this subagent conversation's cost.

Several Bash calls use cat -n to read entire source files at turns 5 and 12, and those files stay for the rest of the conversation. Stripping them from later turns is not obviously a net win, because prompt caching is complicated. A slightly cheaper Bash call starts at turn 91, repeats eight times, and is kept for 74 turns on average.

Thinking blocks of 4,600–6,000 tokens reach this list, mostly the early ones, and the harness is not allowed to discard them. While building an ultra-simple harness loop, the author learned that Anthropic requires those blocks re-sent for tool calls, and a 43-token reminder every turn becomes 1.6% of the cost. The levers are smaller instructions, automatic compaction as the author understands Claude Code can do it, a narrower scope, and intercepting Bash(cat -n ) and Read() to return truncated output rather than adding instructions.

ItemAt the moment it is writtenAfter it stays in context
Initial instruction blocknearly 25,000 tokens, once193 turns, 8.2% of this subagent
Token-count reminder43 tokens every turnfull conversation, 1.6% of this subagent
Thinking blocks4,600–6,000 tokens, oncemany early turns, in the top 40
Bash cat -n readsentire source files at turns 5 and 12kept for the rest of the conversation
Later Bash callslightly cheaper, first at turn 918 uses, kept 74 turns on average
Cache rebuildssession overview, beside the flame graph36% extra cost
Command
/context
Command
cat -n
Command
Bash(cat -n *)
Command
Read(*)

Claude Code token cost explorer news update FAQ

Does Claude Code's /context command include subagent usage?

No. It breaks down context for the main conversation only, which is why the author built the local explorer after ccusage and claude-agent-ledger were not specific enough. The same limit is technically true of Pi, though the author had not had the same cost issues there.

Does the context cost explorer upload Claude Code transcripts?

No. It runs in the browser on the local machine, and transcript data stays there. A network-tab check on a non-sensitive session is the author's suggested confirmation, and Firefox may warn when the page reads local files.

What did the November 6 session show about agents?

The session was 26.6 mb. Blue was among the most expensive subagents, then orange. Green was mostly active early and idle around 9 pm, which is also where that agent's cumulative cost plot stops.

How expensive was the initial instruction block?

Nearly 25,000 tokens, written once and kept for 193 turns, or 8.2% of that subagent's conversation cost. A 43-token count reminder on every turn, kept the whole time, added 1.6%. Cache rebuilds showed as 36% extra cost on the session overview.

Why do early Bash reads dominate Claude Code cost?

Bash was the largest token producer, including cat -n reads of whole source files at turns 5 and 12 that stayed in context. The author thinks cost grows quadratically with turns, so early tokens are paid again later, and compaction is one of the few ways the window shrinks. The author says the harness is not allowed to discard thinking blocks of 4,600–6,000 tokens, and learned on an ultra-simple loop that Anthropic requires them re-sent for tool calls.

Sources

Dillip Chowdary

Author

Dillip Chowdary

Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.

Related on Tech Bytes

Advertisement

5-min tech signal

Weekday briefing for engineers who skip the noise.

No spam · Unsubscribe anytime

Advertisement

✈️ CareerPilot

Your AI job-search copilot

Match your resume against live Ashby, Greenhouse & Lever openings — fit scores, job-specific resume optimization and email alerts.

Find matching jobs →

Free Tools

Browse all tools →