多喝热水 had Full window on, Claude Code's main on a [1m] DeepSeek 4.1 and
a smaller tier beside it. magpie told Claude Code the least tier's window
(CLAUDE_CODE_MAX_CONTEXT_TOKENS=246000), so it read 246K as the main
model's window and asked why 1M never showed. It is also the window
Claude Code falls back to when it stops taking the main for 1M.
Now a [1m] main of magpie's beside a tier that isn't takes the layout
Desktop already has (desktopPlan): the window told is the main's own
(1M), each smaller tier gets modelSettings.<id>.autoCompactWindow at its
own window, and the working window goes in the top-level
autoCompactWindow in place of the env (none under Full window). A [1m]
main alone, a Claude main and the user's own env and settings are as
before.
Run:
- TestClaudeContextWindow's new case (tier beside a [1m] main, with and
without Full window, then the tier gone) fails on the old code
(window "128000", no tier entry, env compact 272000) and passes now.
- Real Claude Code 2.1.302 in a sandbox CLAUDE_CONFIG_DIR on the live
gateway, main workbuddy/deepseek-v4.1-flash[1m], haiku workbuddy/hy3:
/context shows the main at 272k and hy3 at 192k without Full window,
and the main at 1m and hy3 at 192k with it. With the old layout's
env of 246000, hy3 showed 246k, past its own 192k.
A real request on the main replied "ok".
- gofmt -l clean; go vet ./..., GOOS=linux go vet -tags nogui ./... and
GOOS=windows go vet ./... clean; go build ./... ok.
- go test -timeout 45m -count=1 ./... at 95ef45fda: every package ok.
After rebasing onto a595f1559 (no internal/agent changes there),
go test ./internal/agent/ again: ok.