claude-code - 💡(How to fix) Fix [BUG] /effort change confirmation dialog warns about cache miss, but cache is preserved

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

  • Users avoid switching effort mid-session because the dialog warns of cost/latency penalties that don't exist
  • This defeats the intended workflow of dynamically adjusting effort per-task (e.g., high for simple questions, xhigh for complex reasoning)
  • The same F8_ confirmation component is shared between /model and /effort — the warning is correct for model switches but incorrect for effort changes

Code Example

Request 1 — effort high:
  cache_creation: 84,300    cache_read: 0

Request 2 — effort high (control):
  cache_creation: 61,695    cache_read: 22,653   ← partial hit (expected)

Request 3 — effort xhigh (CHANGED):
  cache_creation: 0         cache_read: 84,348FULL cache hit
RAW_BUFFERClick to expand / collapse

Bug description

When changing effort level mid-session via /effort, Claude Code shows a confirmation dialog:

"This conversation is cached for the current effort level. Switching to xhigh means the full history gets re-read on your next message."

Subtitle: "Your next response will be slower and use more tokens"

This warning is incorrect. Empirical testing shows the prompt cache is fully preserved across effort level changes.

Reproduction

Three sequential claude --print calls with identical system/messages, varying only --effort:

Request 1 — effort high:
  cache_creation: 84,300    cache_read: 0

Request 2 — effort high (control):
  cache_creation: 61,695    cache_read: 22,653   ← partial hit (expected)

Request 3 — effort xhigh (CHANGED):
  cache_creation: 0         cache_read: 84,348   ← FULL cache hit

Request 3 shows cache_read: 84,348 and cache_creation: 0 — the entire messages prefix was served from cache despite the effort level change.

This is consistent with the Anthropic prompt caching docs, which state that the effort parameter (sent via the effort-2025-11-24 beta header) is a server-side output control, analogous to max_tokens or temperature, and should not affect the input cache key.

Impact

  • Users avoid switching effort mid-session because the dialog warns of cost/latency penalties that don't exist
  • This defeats the intended workflow of dynamically adjusting effort per-task (e.g., high for simple questions, xhigh for complex reasoning)
  • The same F8_ confirmation component is shared between /model and /effort — the warning is correct for model switches but incorrect for effort changes

Expected behavior

/effort changes should apply immediately without a cache-miss confirmation dialog, since the prompt cache is preserved.

Source code reference

The confirmation is triggered by fM_() in the binary, which checks PVH(model) (supports prompt caching) and shows F8_ dialog with identical text for both model and effort changes. The fix would be to skip fM_() when kind === "effort".

Environment

  • Claude Code: v2.1.143+
  • Model: claude-sonnet-4-6 (tested), applies to all models
  • OS: macOS 15.4

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

/effort changes should apply immediately without a cache-miss confirmation dialog, since the prompt cache is preserved.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] /effort change confirmation dialog warns about cache miss, but cache is preserved