Auto-compact ignores CLAUDE_AUTOCOMPACT_PCT_OVERRIDE on 1M-context Opus — no compaction at 52% (522k) with override=40 [v2.1.156]
Environment
- Claude Code 2.1.156
- Model: Opus 4.8, 1M context (
claude-opus-4-8[1m]) - WSL2 Ubuntu (same config also present on Windows)
Setting
CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=40insettings.jsonenv— verified present in config and live in the running process env.- Auto-compact is not disabled: no
DISABLE_AUTO_COMPACT, noautoCompactEnabled:false, no project/local override.
Expected: auto-compact triggers at ~40% of the 1M window (~400k tokens).
Actual: /context reports 522k / 1M (52%) (Messages 468.6k) with no auto-compact triggered. The override appears not honored on the 1M window — the effective threshold seems to fall back to the built-in default near the top of the window.
Repro: set CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=40 on 1M Opus, run a long session, watch /context go past 40% without compaction.
Related: #54056 and #53199 (compacts too early on 1M) and #36381 (override not triggering at configured threshold). This is the inverse symptom (compacts too late / threshold ignored) but the same root: the override isn't applied on the 1M window.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗