[BUG] Opus 4.7/4.8 token usage regressed 2-3x after update; Opus 4.8 also disconnects frequently
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
After the recent Claude Code update, both Opus 4.7 and Opus 4.8 appear to burn tokens far more aggressively than before. For the same kind of coding workflows, usage feels roughly 2-3x higher than pre-update behavior, and Opus 4.8 is also much more prone to disconnecting or stopping mid-task.
This does not look isolated. Excluding #64774, I found at least 29 directly related issues opened since the May 28 Opus 4.8 rollout / v2.1.15x period that complain about excessive token consumption, quota/session-limit burn, hidden-thinking bloat, context/cache waste, repeated tool-result fetching, or Opus 4.8 disconnect/stall behavior:
#64938, #64901, #64900, #64740, #64619, #64589, #64588, #64362, #64359, #64343, #64328, #64295, #64285, #64283, #64257, #64153, #64152, #64102, #64093, #63981, #63954, #63930, #63893, #63795, #63610, #63511, #63455, #63444, #63282.
The pattern is that normal coding work now consumes a much larger share of the 5-hour/session budget, sometimes without a proportional amount of visible useful work. Opus 4.8 adds a reliability problem on top of the cost regression: disconnects, stalls, or socket/network failures make the already high token burn worse because users have to resume, retry, or re-prompt.
What Should Happen?
Token consumption for comparable coding workflows should remain close to the pre-update baseline. If Opus 4.7/4.8 require materially more hidden thinking, context caching, or tool replay, Claude Code should expose that clearly and give users a hard way to cap it.
Opus 4.8 should also maintain a stable streaming/API connection for normal coding sessions. A disconnect should not cause extra hidden retries or session-limit burn without clear accounting.
Error Messages/Logs
I do not have a single sanitized local transcript to attach here yet.
Representative related symptoms from existing reports include:
- #64102: frequent API disconnects plus excessive token consumption on Opus 4.8, including socket connection closed unexpectedly errors.
- #64153: Opus 4.8 medium effort spent 46k output tokens on hidden thinking for a simple coding turn.
- #64257: opus-4-8 appears to re-fetch identical tool results, reported as 2-3x vs opus-4-7.
- #63954: abnormal session-limit drain since the Opus 4.8 rollout.
- #63282: Opus 4.7 cache-hit collapse / huge message-token jump after the May 27 incident.
Steps to Reproduce
- Update Claude Code to the current v2.1.15x/v2.1.16x line.
- Use Opus 4.7 or Opus 4.8 for normal coding work that previously fit comfortably within the session budget.
- Compare session-limit/token consumption against similar pre-update sessions.
- On Opus 4.8, continue working long enough to hit streaming/API instability or disconnect behavior.
- Observe that token/session usage is much higher than before, often around 2-3x for similar work, and that reconnect/retry/resume behavior makes the cost regression more painful.
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
Before the recent Opus 4.7/4.8 update
Claude Code Version
2.1.15x / 2.1.16x (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Search scope used for the related-issue count: issues in anthropics/claude-code created since 2026-05-28, excluding #64774, whose titles/bodies directly mention excessive token consumption, quota/session-limit burn, hidden-thinking token bloat, context/cache waste, repeated tool-result fetching, or Opus 4.8 disconnect/stall behavior. This is a conservative count; broader area:cost/context/usage searches return many more results but include more noise.
Written by Codex on behalf of the reporter.
9 Comments
You've already done the hardest part — mapping it to a cluster rather than treating it as one bug. For what it's worth, an independent operator-side count lines up with yours: the token-burn / quota-burn reports concentrate sharply on the post–May 28 (v2.1.15x / Opus 4.8) window, and they cleanly separate into two different problems that are worth treating separately:
1. The token-per-turn regression (the "2–3×" part).
The most reliable way to confirm it on your side is to look at the distribution of
output_tokensper turn, not the totals. Routine coding turns historically sit in roughly the 1–5k band; the regressed turns land at 10k+ (sometimes far higher) for the same work. Two ways to check:ccusage(free, community tool) for a quick per-session view, orusage.output_tokens, so a one-linejqover~/.claude/projects/**/<session>.jsonltells you your median band immediately.If your median is in the 10k+ band, the single most effective mitigation today is to route routine work back to Opus 4.7 (
/model), which eliminates most of the delta in practice. Keep 4.8 for the tasks where you actually want the extra reasoning. This is a stopgap, not a fix — but it's a 30-second one.2. The disconnect / mid-task stop (separate failure).
This co-occurs but is a different surface — there's a parallel cluster of mid-stream SSE stalls / pause-token emission on 4.7/4.8 and Sonnet 4.6 (e.g. #64900 has a repro). Worth tracking that thread separately rather than folding it into the cost regression, since a fix for one won't fix the other.
Why it's worth confirming your band before June 15 specifically: after the billing split, programmatic / Pool 2 usage meters at API rates. A 2–3× token regression that's "just" quota pressure today becomes a 2–3× dollar line item after the split, so it's worth logging your current median-per-turn now as a baseline you can compare against on June 16.
If it helps anyone triaging: a free
output-token-spike-detectorhook (MIT, in cc-safe-setup) flags individual turns that cross a threshold you set, which makes the regressed turns visible in real time instead of at the end of the bill — but the Opus 4.7 route + the JSONL audit above are the parts that actually move the number today.I dug deeply into Claude Code prompt cache invalidations across multiple long-running sessions and found several reproducible patterns that may help explain the “random cache drops” many users are seeing.
Key findings from transcript-level audits (
.jsonlanalysis with jq tooling):I confirmed the 5m sliding window is functioning correctly. HOT cache survives ~290s idle and dies shortly after ~300s. So many drops happening under 5 minutes are caused by prefix mutation, not expiration.
Large batches of tool calls in a single assistant turn consistently correlate with invalidation:
Observed effect:
cache_readcollapses from ~100k–300k down to the static floor (~23k), whilecache_creation_input_tokensspikes massively.This appears to be a major hidden invalidation source.
When an async agent/background bash completes AFTER the assistant turn has ended, Claude Code injects the notification through the same
queue-operation → userpath used for queued user messages.That forces a resume request and rewrites the conversational tail:
Example:
read 105.6k → 23.5kwrite 1.9k → 85.6kHowever:
This reconciles the previously confusing “dispatch is free but sometimes agent returns are expensive” behavior.
Another major source of “random” invalidations:
These consistently correlate with HOT-cache rewrites even under the 5m window.
I also built jq-based tooling to classify invalidations by:
The most actionable finding for the Claude Code runtime team is probably:
“queue-operation/user-style injections reposition cache breakpoints and invalidate conversational tails.”
This seems especially relevant for:
Happy to provide sanitized transcripts / jq scripts if useful.
More info:
#63930
#64901
I can confirm this. I work in roughly the same way as before, and my subscription's 5-hour limit used to be more than enough with plenty of room to spare. Now I can hit the entire 5-hour limit in just 2–3 hours, even without working on particularly heavy or complex tasks.
I'm having the same problem. My workflows haven't changed in weeks -- I never hit usage limits. Suddenly overnight, I'm burning through tokens and hitting limits. This sucks. Pls fix.
The details:
This is the missing half of the "2–3× tokens" puzzle — your prefix-mutation finding explains the invalidation, and the cache pricing explains why an invalidation shows up as a 2–3× cost spike rather than a 2–3× token-count spike.
The multipliers (relative to base input price):
So when the prefix is stable, a long conversation's history bills at ~0.1× every turn. The moment something mutates the prefix, that whole span stops being a read (0.1×) and becomes a re-creation (1.25×) — roughly a 12× jump on the cached span, and since the cached history dominates a long session's input, the turn total lands in the 2–3× range you measured. The token count barely moves; the price does. That's exactly why
cache_read_input_tokenscollapsing to near-zero (withcache_creation_input_tokensspiking) is the signal to watch, notinput_tokens.Your two findings map cleanly onto the one invariant — caching is a strict prefix match; any byte change anywhere in the prefix invalidates everything after it, and the render order is
tools→system→messages:Mitigations that follow directly:
datetime.now(), no per-request IDs in system; serialize tools deterministically) — anything volatile up front re-creates the entire downstream cache.usage:total prompt = input_tokens + cache_creation_input_tokens + cache_read_input_tokens. Ifcache_readis near-zero across identical-prefix turns, diff the rendered prefix bytes between two requests to find the invalidator.(Source for the multipliers and the lookback/render-order behavior: Anthropic's prompt-caching docs — the 0.1× read / 1.25× write figures and the prefix-match + 20-block-lookback rules are documented, so this isn't guesswork about model internals.)
Any Updates?
I was on vacation for a few days now and hardly worked, today and yesterday, worked normally again and my 5 hours limit is used up in 2-3 hours, and that has never happened to me before.
Does anyone know what the current state of affairs is?
Edit: I use MacOS Claude Code Desktop!
Adding my case with concrete billing data from the Anthropic Console.
Context: I've been using Claude Code for 3 months. Monthly spend was consistently well under $100 with Opus 4.7 / Sonnet 4.6. Same type of work throughout — nothing changed on my side.
What happened after the Opus 4.8 / Sonnet 5 rollout:
Total: ~$165 in roughly 48 hours, doing the same tasks that previously cost cents per day.
The most striking data point: Sonnet 5 alone burned $58 in a single day. Sonnet is supposed to be ~5–6x cheaper per token than Opus. To spend that in Sonnet means millions of output tokens generated — consistent with the reports in this issue about hidden thinking bloat, context cache waste, and repeated tool-result fetching.
Notably, Haiku 4.5 in the same day cost $0.06, which is the reference point for how the new generation should behave.
Requests:
Screenshots from the Anthropic Console attached.
<img width="1219" height="621" alt="Image" src="https://github.com/user-attachments/assets/e16ae053-31fa-48dc-8d63-948637bb8a4d" />
<img width="1321" height="735" alt="Image" src="https://github.com/user-attachments/assets/4aa1c749-1b72-4339-bea5-11245b1e7075" />