AIToday
Large Language ModelsAI Coding AssistantsAI Business & IndustryZenn AI/MLPublished: Nov 5, 2026, 19:01 JST

Long Claude Code sessions cost 31× more per request, logs show

Send on LINE
Long Claude Code sessions cost 31× more per request, logs show

3 Key Points

  1. What happened

    In one session that ran 13 days and 5,065 requests, a single request late in the session cost about $0.42 against about $0.013 in a fresh session, a 31× gap. Across 6,343 recent requests, 98.2% of billed input was cache_read.

  2. Why it matters

    Because each request resends the whole conversation, cost tracks context length multiplied by request count, so cheap per-token cache reads still balloon in total and longer sessions get costlier toward the end.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, every morning.

Context & Analysis

The post is a practitioner's cost audit rather than a vendor announcement. The author, writing as iguchi of Mukuil, a startup building AI solutions for manufacturing, first assumed that because cache reads are cheaper per token, caching was keeping spend down. Aggregating the usage logs showed the opposite: cheap tokens were being re-read at enormous volume, and that volume was the bill.

The mechanics explain why. Claude Code sends a request to the API on every tool call, and each request carries the whole conversation so far — system prompt, CLAUDE.md, files read, tool output. The arithmetic in the post is that if context grows by a roughly fixed amount per request, total session input scales with the square of the request count, so the back half of a long session is where cost concentrates.

The team's fixes aim at both factors in that multiplication. Session hygiene (/clear, /compact with specified content, restarting past 300K tokens) shortens context, while batching independent tool calls reduces request count; the post estimates moving from an average of 1.17 to 2 calls per message would cut requests by about 41%. One detail suggests the organizational side is the harder part: a subagent defined for large-file reading went unused for 97 sessions and 21,095 requests until CLAUDE.md stated it as a standing instruction, after which it was used 11 times in 27 sessions.

FAQ
Why is cache_read so large a share of the cost?
Claude Code resends the entire conversation to the API on every tool call. Cached portions are cheaper per token, but the volume re-read grows each time, so in Mukuil's logs cache_read reached 1,602,017,331 tokens, or 98.2% of billed input.
What did the team actually change in its workflow?
It wrote rules into its CLAUDE.md: run /clear when a task ends, use /compact or start fresh past 300K tokens, read large files via a subagent, and put independent tool calls in one message. Batching to 2 calls per message would cut requests by about 41%.
How expensive is opening a big file in the main thread?
A 150KB procedure file is about 50,000 tokens. Kept in the main thread for another 1,000 requests at $0.50 per million tokens, it costs roughly $25 from that single read.
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleBrockman: OpenAI Q3 revenue up 70%, enterprise past half