Build1 publisher3 min readPublished
Each plan-mode toggle under opusplan invalidates Claude Code's prompt cache
A teardown of Claude Code 2.1.278's config files and network traffic finds background requests behind the idle summary, the follow-up suggestion and every permission decision, plus a model switch that pays to rewrite the whole cache.
The Engineer · Build desk

What happened
- A dev.to write-up says it read Claude Code 2.1.278's configuration files, environment variables and live API network traffic to see which default-on features send requests of their own.
- Three minutes without interaction mid-session makes Claude Code generate a short conversation summary in a background API request, and that summary is never placed in the context.
- The Tab-to-accept follow-up suggestion that appears after nearly every answer is a second background request, and the author says it is not worth its cost to him.
- Switching models mid-conversation invalidates the prompt cache, which the author prices at 20x to 80x more to rewrite those tokens back in.
Compiled by The EngineerSomething wrong?How this is made
Why it matters
- cost Anyone who runs opusplan and dips into plan mode a dozen times a day is buying two full cache rewrites per dip, at a rate the author puts an order of magnitude above ordinary reads.
- decision Teams reviewing a settings.json can no longer read behaviour off the mode name; pinning acceptEdits is now an explicit choice about how many classifier calls a session makes.
- capability An allow-list of build, test and git commands removes the per-decision classifier call for exactly the operations a coding agent repeats most often.
- constraint Without tokens per call, a team can rank these defaults against each other but cannot forecast the saving before flipping the flags, so the change has to be measured on its own traffic.
Cache reuse separates the cheap defaults from the expensive one. The idle summary and the follow-up prompt suggestion both run as background API requests that reuse the session's prompt cache [6][9]. Reads against a live cache are the cheap part of a long session. What those two add is call volume: one request per response for the suggestion, so its count tracks your turn count [24], and several summaries across a session that pauses often [6]. Neither lands in the context window, and the suggestion only does if you press Tab and accept it [8].
Auto memory is the one that touches context: MEMORY.md is updated during the conversation, and that spends tokens as you work [13]. One line turns it off, `"autoMemoryEnabled": false`, or the environment variable `CLAUDE_CODE_DISABLE_AUTO_MEMORY=1` [14].
Under `opusplan`, Claude Code moves between Opus and Sonnet when you enter or exit plan mode [11]. That is where the money goes. Going in is one switch and coming out is the second, so a single detour pays the rewrite penalty twice [22].
The mode named `default` is not the one Claude Code starts in [15]. Every permission decision in auto mode is an API call to the classifier [17], and plan mode uses auto when it is available [18]. So the planning path switches the working model and routes each approval through a second one.
Set `defaultMode` to `acceptEdits` and pre-approve the commands you always say yes to, such as `Bash(npm run build)`, `Bash(npm test:*)`, `Bash(git diff:*)` and `Bash(git status)` [19]. Each entry there is a decision the classifier never sees. The away summary goes off through `/config` or `awaySummaryEnabled: false`, and `/recap` still produces one on demand [7]. The suggestion has both a settings key and an environment variable, `promptSuggestionEnabled` and `CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION` [10].
For these numbers to carry to your setup you need the same build, 2.1.278 [2], Opus 5 as the working model [3], and a subscription cache with the one-hour TTL the documentation describes [4]. Three minutes of idle sits well inside an hour, so the summary request arrives while the cache is still live and pays read prices [23]. Shorten the TTL below the idle threshold and that same request lands after expiry.
The write-up reports multipliers and call frequencies, not tokens per call or a dollar figure for a session [25]. That is enough to rank the defaults against each other. It does not support a claim about what share of a Claude Code bill these settings account for. "The goal isn't to argue that you should turn off every single feature, but rather to raise awareness of their hidden costs, allowing you to choose whether the benefit of each feature justifies its price," the author wrote [20].
What to watch
- A network capture on a build later than 2.1.278 showing whether auto is still the shipped permission mode.
- Per-call token figures for the background summary and suggestion requests, from anyone who logs them.
- Whether the 20x to 80x rewrite range holds on metered API billing as well as on the subscription cache.