Opus 4.7 ([1m] variant) capped at 200K context in Claude Code Desktop on Max plan
Status Open
Reported on v2.1.80
Maintainer reply None cached
Activity 5 comments · opened May 2, 2026
Preflight Checklist
- [x] I have searched existing issues for similar behavior reports
- [x] This report does NOT contain sensitive information (API keys, passwords, etc.)
Type of Behavior Issue
Other unexpected behavior
What You Asked Claude to Do
Want to use 1m context
What Claude Actually Did
Stuck at 200k context
Expected Behavior
1m context
Files Affected
Permission Mode
Accept Edits was ON (auto-accepting changes)
Can You Reproduce This?
Yes, every time with the same prompt
Steps to Reproduce
Close claude desktop, and re-open it. My default is Opus 4.7 ([1m] variant), which shows.
I type /context and it shows 200k.
I can click the bottom right hand thingy and it says context window xxx/200k
<img width="858" height="978" alt="Image" src="https://github.com/user-attachments/assets/3a88e6d3-8054-4b56-a991-35292314f0d4" />
Claude Model
Opus
Relevant Conversation
Summary
On the Max plan, selecting Opus 4.7 with the explicit 1M variant ID (claude-opus-4-7[1m]) in Claude Code Desktop on Windows shows a 200K context window in /context instead of the expected ~1M. Previously had 1M on this same account/build before a temporary downgrade to Pro and re-upgrade back to Max.
Environment
Claude Code (CLI version on this machine, from claude --version): 2.1.80
Surface: Claude Code Desktop app on Windows 10
OS: Windows 10
Plan: Max (re-upgraded from Pro recently — Downgrade happened on approx April 4th. Upgrade happened May 1st/2nd (was around midnight))
Observed
Fresh session after a full Claude Desktop restart.
/model claude-opus-4-7[1m] accepted: Set model to claude-opus-4-7[1m].
/context reports: Model: claude-opus-4-7[1m], Tokens 153.3k / 200k (77%), Autocompact buffer 33k. Total cap is 200K, identical to the non-[1m] model.
Switching back to plain claude-opus-4-7 shows the same 200K cap.
/bug and /feedback are not registered slash commands in Claude Desktop, so this issue is filed via GitHub instead of in-app.
/model in Desktop accepts a model ID inline only; it does not surface an "Opus (1M context)" picker option that the CLI documentation describes.
~/.claude/settings.json had "model": "claude-opus-4-7" (plain ID); changing this to "claude-opus-4-7[1m]" does not change the /context cap either.
Expected
Per https://code.claude.com/docs/en/model-config.md#extended-context, on the Max plan Opus auto-upgrades to a 1M context window. /context should reflect ~1M when claude-opus-4-7[1m] is the active model.
Reproduction
On Max plan, open Claude Desktop on Windows.
/model claude-opus-4-7[1m] → accepted.
/context → shows 200K cap.
Quit Claude Desktop fully, relaunch, start a fresh session.
Repeat steps 2–3 → still 200K cap.
History (pre-bug, possibly relevant)
Account had 1M Opus context working previously on this same machine/build. Plan was downgraded to Pro temporarily, then re-upgraded back to Max. The 200K cap persists since the re-upgrade.
Already tried
Restart of Claude Desktop, fresh session.
Explicit claude-opus-4-7[1m] selection via /model.
Editing ~/.claude/settings.json to pin the [1m] variant.
Hypothesis
The 1M context entitlement is gated on cached account/plan state that wasn't refreshed after the Pro→Max re-upgrade. The model ID is recognized (selection succeeds), but the per-session context cap is still being computed from the prior plan tier.
Impact
High - Significant unwanted changes
Claude Code Version
Claude Code (CLI version on this machine, from claude --version): 2.1.80
Platform
Anthropic API
Additional Context
I had claude write up the bug report, so I put it into the relevant conversation
5 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
+1
Same bug, new data point that disproves the existing hypothesis.
I'm a Claude Max user on Claude Code Desktop v2.1.141, Windows 11. The bug fires identically for me. But I haven't changed plans, haven't re-authed, and haven't changed local config between working and broken states — so the "plan-change entitlement cache" hypothesis can't be the full root cause. The bug is broader than that.
Trigger math, verified live on my machine
Claude Code computes the auto-compact trigger as:
That matches the cascade onset I observe exactly. My env is correctly set to
WINDOW=1000000andPCT_OVERRIDE=95, so whatever feeds thedetectedvalue is reading the served window as ~200K for the[1m]variant on Max, not 1M.30-day data from my local
~/.claude/cache/compaction-log.jsonl| Metric | Value |
|:--|--:|
| Total compaction events | 607 |
|
autotriggered | 602 ||
manualtriggered | 5 || Unique sessions with at least one compaction | 153 |
| Sessions with ≥2 compactions | 114 |
| Sessions exhibiting thrash (sub-120s gap between successive compactions) | 99 (87% of multi-compaction sessions) |
| Worst single session | 29 compactions, shortest gap 59.8s |
| Worst single day | 2026-05-20 — 59 auto-compactions |
Multiple sessions show sub-second cascade gaps:
826765dc-934: 12 compactions, shortest gap 0.91sb8367848-30f: 8 compactions, shortest gap 0.39s588913e9-6b8: 7 compactions, shortest gap 0.57sThe harness has been logging this for a month from a single JSONL file — happy to share the raw log (120KB filtered to 30-day window).
Six client-side mitigations have all failed
Five different
WINDOW/PCTpermutations and one "disable via high threshold" attempt — all thrashed within 24h. Cannot be defeated client-side becausemin(WINDOW, detected)clamps to the wrongdetectedvalue before any client config applies.Also filing as a Max-entitlement-not-delivered support case
The Anthropic docs at
code.claude.com/docs/en/model-config#extended-contextstate that Max auto-upgrades Opus to 1M context. I'm being served ~200K. That's materially a paid-feature-not-delivered situation, not just a CC bug, so it's also going tosupport@anthropic.comin parallel — that should route to the accounts/entitlement team, not just CC engineering.Second-order bug: manual
/compactpast ~350K never finishesWhen the session is already in the thrash zone,
/compactregisters incompaction-log.jsonlwithtrigger: "manual"but the displayed context bar never moves. The session does not return to a usable state. Reading this as the manual/compactbeing queued behind the auto-cascade rather than preempting it. Even with the 200K cap, manual/compactshould be a high-priority interrupt that preempts cascading auto-compactions.One concrete debugging suggestion
Log the
detectedwindow value intocompaction-log.jsonlalongside the trigger reason. Right now users and Anthropic both have to infer it from the trigger threshold. If the runtime emitted{"detected_window": 204800}we'd see this immediately and stop guessing.Repro environment
Reporter:
tristen@innovation-labs.co— happy to share raw JSONL, full env dump, and a recorded thrash session on request.cc'ing the related-issue cluster for visibility: #47019, #35677, #34143, #43989, #42375, #34332, #50204, #19567.
Another data point, on a different surface — and a concrete local field that looks like the gate.
Same core symptom on Claude Code CLI v2.1.185, macOS, Max plan, org admin role, account stable for months (no plan change and no re-auth between the working and broken states). So this isn't Windows/Desktop-specific, and — consistent with @hiddenlayer1 — the "plan-change entitlement cache" hypothesis doesn't explain it for me either.
Concrete local state that appears to gate 1M.
~/.claude.jsoncontains an undocumented cache:hasAccess: falselines up exactly with being served a ~200K window for the[1m]model. What stands out is that this entry is stuck — I could not get the client to re-fetch it:~/.claude.jsonmtime updates, but thes1mAccessCache[<org>]entry keeps its old timestamp andhasAccess: false.s1mAccessCache(kept a backup) and restarted; the client rewrote~/.claude.jsonbut did not repopulates1mAccessCache— the key stays absent and 1M is still not served.So on both of these triggers the client never re-fetches the 1M entitlement, which fits @hiddenlayer1's point that the wrong served window is decided before any client-side config applies.
Other related flags alongside it (booleans/enums only):
hasAvailableSubscription: false— despite an active Max subscription (billingType: stripe_subscription). That inconsistency looks relevant.hasOpusPlanDefault: falsecachedExtraUsageDisabledReason: "org_level_disabled"Actionable asks (extending @hiddenlayer1's logging suggestion):
detectedwindow ands1mAccessCache.hasAccess, so this is observable instead of inferred from the compaction threshold.Additional data point — Windows 11, Claude Code CLI v2.1.136, cap triggered specifically on sub-agent spawn (Task/Agent tool), not parent session.
Working on a heavy multi-agent project (dense
CLAUDE.md+ handoffs + ~30 custom subagents defined in.claude/agents/, so boot context ≫100K tokens). Parent session starts with the model stringclaude-opus-4-7[1m]— parent works.Failure mode: spawning a subagent via
Task(e.g. our/desarrollador TK-NNNworkflow) gets rejected at 1M and silently capped to ~200K on the subagent side. This matches @hiddenlayer1 and @kiyono, but adds a new trigger surface: sub-agent spawn specifically. Trivial-payload subagents (e.g. one that just echoes a token) still complete because they never approach the 200K cap; the cap only manifests when the spawned agent's own context nears the ceiling.Local
~/.claude.jsonstate on affected machine:Strictly worse than @kiyono's report — they had
s1mAccessCache[<org>].hasAccess: falsestuck stale. Here the wholes1mAccessCachekey has never existed. Reinforces their point that there is no client-side path to refresh this cache — mine was never populated in the first place. Re-login + restart do not create it.Env:
2.1.136Extending @kiyono's actionable asks:
spawn.detected_windowin the JSONL). Today the subagent has no way to know it was capped — from inside it looks like a normal[1m]session that mysteriously runs out of space.s1mAccessCacheabsent is also a stuck state — bootstrap logic doesn't populate it. Login/re-login/config-delete-restart do not trigger the first fetch. No client-side recovery path.