young02036 on Discord put Codex Plus gpt-6.1-sol (500K) and Claude opus 5.5 (1M) in one routing group, with Context set to the smallest member's (500K). Each model picked on its own showed its window. The group showed 200K.
Cause: with the main model one of Claude's own, marked [1m], magpie tells Claude Code no window. Anthropic runs that model at its own window, so claudeWindow is 0 and no CLAUDE_CODE_MAX_CONTEXT_TOKENS is written. writePicker still lists every magpie model and group in /model. Claude Code 2.1.314 runs an id it doesn't know as Claude's at that MAX, and with no MAX at its own 200K. So group/mix and w/gpt-6.1-sol picked there ran at 200K.
Fix: pickerApart takes desktopPlan's path when four things hold:
- the main is a Claude model or a group of them;
- claudeWindow is 0;
- /model offers a row that is unmarked;
- that row isn't Claude's and has a known window.
desktopPlan also counts the picker rows (pickerRefs). The top MAX is then the largest window, and each smaller row gets its own modelSettings.<id>.autoCompactWindow. A group gets its smallest member's window, the same as every other agent; under Full window that is 500K uncapped.
Every other main is as before. A told window still serves a /model pick, and a main of no known window keeps the last one. Codex, OpenCode, DSH, Pi and the rest already list the group at 500000: they read the catalog's Context, which for a group is its smallest member's.
Real Claude Code 2.1.314, in a sandbox HOME against a fake Anthropic server, with `-p --model X "/context"`:
- old layout (no MAX): group/mix 200k, w/gpt-6.1-sol 200k;
- new layout: group/mix 272k, gpt 272k, glm 204.8k, claude [1m] 1m;
- new layout without the group's entry (Full window): group/mix 500k.
- go test -tags nogui ./internal/agent/: ok (289s), on the base before the rebase (576b5dcbc)
- at 3e5aa1151, after the rebase: go test -tags nogui -run 'Window|Picker|Context|TierEffort|Budget' ./internal/agent/: ok
- go vet ./..., GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet ./...: ok
- gofmt -l: clean
- full suite (go test -tags nogui -timeout 45m ./...) at 3e5aa1151: still running at push, per the ship-immediately rule; any red gets an issue
Broken by hand: with pickerApart's term forced false, TestPickerModelsTheirOwnWindow is red with 10 errors ("a Claude main: group/mix in /model compacts at ""; want "272000"", MAX "" want 1000000, and so on). Earlier versions of the trigger turned five existing tests red (TestClaudeContextWindow, TestClaudeDesktopContextWindow, TestClaudeTierEffort, TestTypedWindowReachesCodexAndClaudeCode, TestLargestMemberTypedWindow), so the trigger is limited to a Claude main.
Not tried:
- the interactive /model switch (only `-p --model`);
- the reporter's real accounts;
- confirmation from the reporter that the agent is Claude Code.
Left alone, filed as #4509: a /model pick smaller than a non-Claude main's told window runs on the main's window.