TokenSave Data · Dataset
Long chat or new chat? What 30 requests cost in Claude Code
Starting a new chat for every request cost more than twice as much as staying in one long chat. We sent the same 30 change requests to one browser game in Claude Code three ways. One long session cost $4.16 on average, one session with /compact halfway $4.70 (+13%), and a fresh session for every request $9.52 (+129%).
Measured 2026-10-20 · Claude Code (Opus 5.5) · 30 requests × 3 strategies × 2 runs · License CC BY 4.0
Key findings
- A new session per request was the most expensive strategy, by far. Total API cost: one session $4.05 and $4.27; a new session each time $9.19 and $9.84. Both runs agree.
- Why: a fresh session has to find its way back in. Without the conversation, Claude Code re-read the game file and rebuilt its prompt cache on every request: a mean of 6.7 model calls and 29,178 newly cached tokens per request, against 5.2 calls and 4,061 in the long session. Cache writes cost twice the input price; cache reads cost a twentieth.
- A long chat does get more expensive per message. In one session, requests 2–5 cost $0.029 each on average and requests 26–30 cost $0.284, about 10 times as much, because every message re-reads a longer history and the game kept growing. Even then, a late message in the long chat was cheaper than an early one in a fresh session ($0.210).
/compactdid not save money here. Compacting after request 15 cost $0.11 and $0.11 itself, and the next request had to rebuild the cache, so the total came out +13% against the uncompacted session. Over 30 requests the shorter history never paid that back.- All six final games worked after 30 rounds of changes, whichever strategy was used.
Results by strategy
Two runs each. Per-request costs are means over both runs. For one-session strategies Claude Code reports session totals, so each request is the difference from the previous one; the cost of the /compact call is counted in the total. Cost is the API list-price estimate (Opus 5.5).
| Strategy | Total API cost, run 1 · run 2 | vs one session | Per request, 2–5 | Per request, 26–30 | Input tokens (total) | Time |
|---|---|---|---|---|---|---|
| One session | $4.05 · $4.27 | – | $0.029 | $0.284 | 6,634,126 | 19 min |
| One session, /compact after 15 | $4.42 · $4.99 | +13% | $0.035 | $0.271 | 6,567,088 | 19 min |
| New session per request | $9.19 · $9.84 | +129% | $0.210 | $0.435 | 5,084,241 | 19 min |
What to take from it
- For a run of related changes to the same project, keep going in the same session; that is what the prompt cache is built for.
- Start a new session when you switch to unrelated work, not between every small change.
- Save
/compactfor when the context is close to full or the history is confusing the model. It is not a cost-saving step on its own. - Pauses matter too: the cache only lasts so long, which is the subject of our coffee-break measurement.
Method
- Claude Code 2.1.295 with Opus 5.5 on one Windows laptop,
claude -p --effort medium --permission-mode acceptEdits, no MCP servers. Request 1 builds a brick-breaker game; requests 2–30 change it (ball colour, levels, sound, touch controls, a clean-up at the end). The full list is in the JSON download. - One session: requests 2–30 sent with
--resumeto the first session. /compact: the same, with/compactsent after request 15. New session: each request in a new session in the same folder, prefixed with “The game is in index.html in the current folder.”. - All three strategies ran at the same time, twice, on 2026-10-20. Tokens and cost from the
resultevent of each call.
Limitations
- One project of about 30–40 KB and requests that mostly touch the same file. A long session that wanders across unrelated work, or one that reaches the context limit and auto-compacts, may behave differently.
- Claude Code only. Other tools cache differently.
- On a subscription the bill does not change, but the same difference applies to how fast you reach the usage limit.
How to cite
Free to use, quote and republish with attribution under CC BY 4.0. Please link to this page.
TokenSave (2026). Long chat or new chat? What 30 requests cost in one Claude Code session, with /compact, and in fresh sessions [Data set]. https://tokensave.app/data/long-chat-vs-new-chat-cost
Embed the chart
Related
Questions or corrections: contact@jonhisking.com