Skip to content

Autocompact window guidance is wrong for 1M-context models (3 harness layers) #520

Description

@BaseInfinity

What happened

Global ~/.claude/settings.json carried CLAUDE_CODE_AUTO_COMPACT_WINDOW: "350000" (itself a replacement for an older CLAUDE_AUTOCOMPACT_PCT_OVERRIDE: "35"). On Opus 5's 1M window this made the status line report two numbers that look contradictory but are both correct:

ctx:11% (890k left)        <- measured against the real 1M window
4% until auto-compact      <- measured against the artificial 350k window

Net effect: auto-compact fires with ~650k of usable context unused. Both knobs only ever move compaction earlier — neither raises real capacity. Removed from layer 1 on 2026-08-08.

The three layers need three different answers

Layer 1 — user global (~/.claude/settings.json) — RESOLVED. Override removed; auto-compact now uses the model's real window.

Layer 2 — this meta-repo (.claude/settings.json) — OPEN. This repo has no env block at all today. Question: does a repo whose sessions routinely hold a Codex review, a Fable review, a full diff, and a 73-suite sweep want an explicit setting? Note the only available direction is earlier compaction, so the answer is plausibly "still nothing" — but it should be a decision, not an accident.

Layer 3 — what the wizard ships (CLAUDE_CODE_SDLC_WIZARD.md) — OPEN, and the real defect. Lines ~1044-1049 and ~1118 document both env vars and correctly warn "Do NOT set both." What they do NOT say is that on a 1M-context model you should set neither — the guidance reads as if picking one is the right move. A consumer following it on Opus 5 reproduces exactly the misconfiguration above. skills/sdlc/SKILL.md also pairs CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=30 with a claude-opus-4-6 pin, same trap.

Proposed fix (layer 3)

Add an explicit "on a 1M-context model, set neither" line, and reframe the existing text so the vars are presented as narrowing tools for small-window pins (e.g. opusplan at 200K), never as tuning for large windows.

Constraints

  • Layer 3 is a shipped-doc change: TDD RED/GREEN + full cross-model round required.
  • skills/sdlc/SKILL.md is at 19,356 / 20,000 bytes — any addition there needs an equal-or-greater trim.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions