Statusline/model picker shows base model (missing "1M context") on session resume until model picker is reopened
Description
When resuming a session that was previously running on the 1M-context beta variant of a model (e.g. Opus with [1m]), the CLI resumes the correct model family but does not show or apparently apply the 1M-context variant until the model picker is manually reopened and the model reselected. After reselecting (even selecting the same model that's already "active"), the statusline and presumably the actual context window correctly reflect the 1M variant.
Steps to reproduce
- Run a session on an Opus (or other) model with the 1M-context beta enabled (
claude-opus-4-8[1m]). - End the terminal / process.
- Resume the session later (
claude -c,claude -r <id>, or the CLI's own auto-continue prompt) from a fresh process. - Observe the statusline (via the
statusLinehook /hookSpecificOutput.model.display_namefield passed to the status line script): it shows the base model (e.g. "Opus") with no(1M context)suffix, andmodel.idhas no[1m]suffix. - Open the in-app model picker and reselect the same model (still showing/selecting the 1M option).
- Statusline immediately updates to show
(1M context)/model.idgains the[1m]suffix.
Expected behavior
On resume, the CLI should restore (or immediately re-verify) the same model variant, including 1M-context status, that the session was using when last active — without requiring a manual picker round-trip.
Investigation notes
- Confirmed via a custom statusline script that only passes through
input.model.display_name/input.model.idverbatim — no local logic decides the 1M suffix, so the wrong value is coming from the CLI itself in the hook payload. ~/.claude.jsoncontains aclientDataCacheSlotsmap with timestampedmodelfields, some recorded asclaude-opus-4-8(no[1m]) and others asclaude-opus-4-8[1m], entrypoint"cli"in both cases.~/.claude.jsonalso has anadditionalModelOptionsCachearray that appears to track which models currently have the 1M option unlocked/available — it currently holds only one stale entry, suggesting this cache is populated/refreshed lazily (e.g. only when the model picker is opened) rather than on session start/resume.- Working theory: on resume, the CLI doesn't re-run whatever entitlement/availability check populates the 1M-availability cache, so it falls back to displaying/using the base model until the picker forces that check.
Environment
- Claude Code version: 2.1.217
- OS: Windows 11 Pro (10.0.26200)
- Resume methods tried: bare
claudeauto-continue,claude -c,claude -r <session-id>— same symptom on all
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗