[Bug] Auto-compaction never triggers on install: trigger paths fully gated behind tengu_sepia_moth (cached false), no fallback path (2.1.209, Windows desktop)

Status Open
Reported on v2.1.209
Maintainer reply None cached
Activity 0 comments · opened Jul 18, 2026

Summary

Auto-compaction never fires on this install. Not "fires late" or "wrong threshold": across ~30 days of heavy daily use, every compact_boundary in every transcript on the machine has "trigger":"manual". There is not a single "trigger":"auto" anywhere. Sessions on 1M-context models routinely sit at 400-500k tokens across many turns and only ever shrink via manual /compact.

Environment

  • Claude Code 2.1.209, Windows 11 Pro
  • Windows desktop app (MSIX), engine at %APPDATA%\Claude\claude-code\2.1.209\claude.exe; also reproduced running the same engine binary standalone with -p
  • First-party API, Max (20x) subscription

Root cause (from inspecting the shipped binary + local state)

The only auto-compact trigger paths in 2.1.209 (the reactive check and the precomputed-compaction arming, both funneled through the internal predicate that requires Kk() && Cge() && Qe("tengu_sepia_moth", false) && precomputeCompactionEnabled) are gated on the GrowthBook flag tengu_sepia_moth.

On this install, cachedGrowthBookFeatures in ~/.claude.json has:

"tengu_sepia_moth": false

With that flag false there appears to be NO fallback trigger path: autoCompactEnabled is true, precomputeCompactionEnabled is true, DISABLE_AUTO_COMPACT/DISABLE_COMPACT are unset, yet nothing ever initiates a compaction with trigger:"auto". If this flag is a staged rollout of the only remaining trigger mechanism, every install outside the cohort currently has no automatic compaction at all, while the UI (context meter with an auto-compact marker) still implies it will happen.

Functional repro

  1. CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=42 delivered via the settings.json env block. Verified present in the engine process environment (read directly from process memory), so threshold math (floor(window * pct/100)) should arm at ~84k on a 200k-window model.
  2. Standalone claude -p session on claude-haiku-4-5: filled context to ~150k mid-turn via file reads. No compaction, no compact events in the transcript.
  3. Resumed the session repeatedly (turn boundaries) with context well above threshold after refills (~118k). Still zero auto compaction events.
  4. Same fill test in an interactive desktop session: context climbed to 153.8k/200k (77%), nothing fired.
  5. Transcript history sweep across all projects: "compactMetadata":{"trigger":"auto" matches zero files; manual compactions found at preTokens 271k, 300k, 498k.

Additional findings

  • The desktop app launches its engines with DISABLE_MICROCOMPACT=1, so tool-result microcompact is also off in desktop sessions. Combined with the gated trigger, desktop sessions have no context reduction mechanism at all besides manual /compact.
  • CLAUDE_AUTOCOMPACT_PCT_OVERRIDE is correctly plumbed (settings env reaches the engine, value parsed, would be honored by the threshold function), but it is moot while the trigger machinery never runs. Users discovering this env var will conclude it is broken.

Likely related symptom reports

  • #63015 (auto-compact never triggers despite statusline reporting 100%)
  • #65379 (auto-compact does not trigger after context exceeds 80-100%, Windows, marked duplicate)

Both match the "trigger machinery never runs" signature and may share this root cause.

Ask

Either widen the tengu_sepia_moth rollout, restore a fallback trigger path when the flag is off, or make the context UI stop implying auto-compaction will occur on installs where it cannot.

---

Investigated and filed with Claude Code (Fable 5) running on the affected machine; process-memory and transcript evidence available on request.

View original on GitHub ↗