[Bug] Auto-compact triggers far below 1M window on Opus 4.7 [1M] — severe token burn regression on Max 5x (post-2.1.116)
Summary
On claude-opus-4-7[1m], auto-compact now triggers far below the 1M context window despite 1M being selected and shown in /model. The behavior changed ~2 days ago — prior to that, compact correctly triggered near the actual ~1M limit. No user-side configuration changes.
In addition to the premature compact, token consumption per turn has increased substantially: 5-hour Max plan windows are now exhausted within a fraction of previously-normal usage on identical coding workflows.
Environment
- Claude Code version (current): 2.1.119
- Onset: ~2 days ago (cannot pinpoint the exact version where the regression appeared, possibly 2.1.118 or 2.1.119, or a server-side flag rollout — see below)
- Model:
claude-opus-4-7[1m](1M context, confirmed in/model) - Plan: Max 5x
- Settings (unchanged for months):
alwaysThinkingEnabled: trueeffortLevel: "high"ultrathinkused in-session for hard tasks- OS: Linux (Ubuntu)
- Install method: native (single-binary install)
Behavior
Before (~2+ days ago) — correct
- Auto-compact triggered close to 1M tokens (near the actual context limit)
- Token consumption per turn was reasonable
- 5-hour rate-limit window comfortably covered a normal coding day
- Long coding sessions sustainable end-to-end
Now — regression
- Auto-compact triggers much earlier than before — well below the 1M window. The exact percentage varies between sessions, but consistently far below where it used to fire.
- Severe token burn: 5-hour limits exhausted in a small fraction of normal time on identical workflows
- Constant compacts invalidate cache, re-inject CLAUDE.md / memory, slow iteration significantly
- Sessions are practically unusable
Ruled out
- CLAUDE.md size: 667 bytes (negligible)
- Memory files: ~12K total (negligible)
- MCP servers: 0 installed
- Plugins: 0 installed
- No settings change in months — these settings worked fine before
Note on root cause
Because the regression appeared abruptly without a user-side update event, this could be either:
- a CLI version regression (auto-update happened in the same window), or
- a server-side / GrowthBook flag rollout that silently changed the resolved compact threshold (see #46331 for prior precedent)
A downgrade to 2.1.116 has been performed as a workaround; behavior on that version will be reported back if the issue persists or resolves.
Workaround
Manual downgrade to 2.1.116 + auto-updater off:
curl -fL -o ~/.local/share/claude/versions/2.1.116 \
https://downloads.claude.ai/claude-code-releases/2.1.116/linux-x64/claude
chmod +x ~/.local/share/claude/versions/2.1.116
ln -sfn ~/.local/share/claude/versions/2.1.116 ~/.local/bin/claude
echo 'export DISABLE_AUTOUPDATER=1' >> ~/.bashrc
Likely related issues
- #36014 — autocompact triggers at 17% on 1M context model (effectiveWindow likely capped at 200K) — matches this symptom
- #52981 — auto-compact triggers at ~8% context usage (84K/1M)
- #46331 — GrowthBook experiment
tengu_amber_redwoodsilently reduces autocompact window - #50803 — 1M context window not auto-applied on Max plan;
--modelflag drops[1m]suffix - #52522 — adjacent: documents 2.1.117 threshold-detection change with subscriber-impact concerns
- #52153 — excessive token consumption per prompt on Opus 4.7 1M
Ask
- Confirm whether the 1M window detection has regressed for Opus 4.7 on Max 5x accounts (or any plan) within the last few days, either via CLI release or server-side flag
- Check whether a GrowthBook flag (e.g.
tengu_amber_redwoodor similar) is targeting accounts and overriding the resolved compact threshold below the model's actual window - Either fix the detection or expose the resolved compact threshold in
/contextoutput (currently it shows the model window but not the actual percent at which compact will fire), so users can verify what the CLI is actually using - Given the subscriber cost impact (5x plan exhausted on identical workflows), surface defaults/threshold changes in release notes with explicit "Impact on subscribers" callouts going forward
This issue has 10 comments on GitHub. Read the full discussion on GitHub ↗