ZeroX2017 on X (0.1.4404): a compaction threshold of 1048576 typed for
Ollama Cloud's 1M DeepSeek went into ~/.claude/settings.json as it was.
Claude Code 2.1.316's settings schema (and Claude Desktop 2.7032's copy
of it in app.asar) takes autoCompactWindow as an int of 100000 to
1000000 and reads a larger one as none, so a new Claude App session ran
that model at the top-level 272K for every model.
Every auto-compact window magpie writes for Claude Code is now held to
1000000 (claudeCompactCap): the per-model modelSettings entries
(claudePlan), the top-level autoCompactWindow, and
CLAUDE_CODE_AUTO_COMPACT_WINDOW. An entry the hold makes equal to what
the model runs at anyway is left out. The threshold in magpie stays as
typed; Codex and Grok Build get it unheld; tune's card still reads the
top-level value back as Long conversations at the typed value
(claudeLongWindow compares against the held value). agent-wiring.md
says so.
Tests: TestClaudeCompactHeldToClaudeMax (Desktop entry, a second sync
rewrites nothing, magpie's threshold unchanged, the variable when
Claude Code is alone, Codex unheld), TestClaudePlanHeldToClaudeMax,
TestClaudeTopCompactHeldToClaudeMax (top-level + tune read-back).
Run:
- Full suite, go test ./... -timeout 45m -count=1 on mote at base
afabb7f90: exit 0, 103 packages ok, no FAIL/panic/timeout in the
kept log.
- Rebased on origin/main 07d19510f (11 commits, GUI and
internal/library only, nothing in internal/agent): go test
./internal/agent ./internal/library -count=1 ok on mote;
GOOS=linux and GOOS=windows go vet ./internal/agent ok; gofmt -l
clean.
- Broken by hand: claudeCompactCap made a no-op, all three new tests
red (entry 1048576, top-level 1048576).
Not tried: a real Claude App session with a 1048576 threshold; the
schema bounds were read from Claude Code 2.1.316 and Desktop 2.7032's
bundled source.