KorenKrita on Discord (cause confirmed by them): with Claude Code's
subagent model unset ("Claude Code picks") and a subagent effort set,
claude.go wrote spell(tierWith(main model, effort)) into
env.CLAUDE_CODE_SUBAGENT_MODEL. That pinned every subagent to the main
model, so Claude Code's own pick (the Agent call's model, the subagent's
frontmatter) never ran.
Agent wiring (internal/agent/claude.go):
- With no subagent model, magpie writes no effort, and
CLAUDE_CODE_SUBAGENT_MODEL stays unset.
- The saved effort is kept, not deleted (the user set it). It lives in
the stash under claude.subagent_effort, and the subagent effort's Get
reads "" while there is no model. A model picked later takes it
("v/glm:high").
- A value an older magpie wrote that way (the main model at an effort,
not own, while routed: subagentFollowing) is moved into the stash and
taken out of the env by writeTiers and by Sync on start.
- subagentOwn no longer counts that value as the user's own model.
- Doc: docs/subsystems/agent-wiring.md, the Claude Code "subagents" entry.
GUI (window, opened Claude Code row):
- The subagent effort moves from its square under the session defaults
to the right of the Subagents row. It uses the tier rows' markup and
code (effortBtn in connectPanel, ag-eff), so it lines up with
Opus/Sonnet/Haiku's effort.
- While the subagent model is unset it shows Default, is disabled, and
its title says "Set a subagent model first". The new string is in zh,
zh-TW, ja and de.
- The old square is removed from the opened row. No other layout changes.
- The tray panel's own square is left alone: #3308.
Tests:
- New internal/agent/claude_subagent_effort_test.go
(TestClaudeSubagentEffortNeedsAModel). On the old code it is red:
an effort with no subagent model wrote
CLAUDE_CODE_SUBAGENT_MODEL="v/glm:high"
With the Sync branch broken by hand it is red at "Sync left an older
magpie's CLAUDE_CODE_SUBAGENT_MODEL="v/flash:high"". It also checks
that a set model plus effort still writes "v/glm:low".
- claude_tiereffort_test.go now expects no env for an effort with no
model.
- New internal/gui/tests/claude-subagent-effort-row.test.cjs (16 cases):
chromium/webkit x en/zh x 1100/560px x with/without a subagent model.
It checks:
- the control sits in the Subagents row at the tier efforts' x and
height;
- with no model it is disabled at Default and opens no slider;
- with a model it posts subagent_effort, with no scroll;
- the old square is gone.
It is red against the old app.js ("the old square is still there").
- tier-effort.test.cjs is updated for the moved control.
Run at this tree (parent f985d6bdb):
- go test -count=1 ./internal/gui/ ./internal/agent/ ./internal/provider/:
ok.
- GUI: claude-subagent-effort-row, tier-effort, i18n-keys,
subagent-effort, claude-subagents-pick, desktop-subagent-model,
agent-prefs, agent-tweak-fold, claude-signin and agent-field-names:
147/147.
- gofmt clean. go vet darwin, linux -tags nogui and windows: ok.
Run at the same change before its last rebase:
- Full Go suite (`go test -count=1 -timeout 45m ./...`, sandbox HOME,
through the suite lock) at 11b9d671c (on 45593cc1d): every package ok
but internal/gui's TestCoreScriptBudget. app.js was 1,337,535 bytes,
over its 1,337,000 budget, after the rebase brought in upstream growth.
This commit trims its own additions to 1,336,991 (one shared effortBtn,
shorter comments, a shorter new string) and raises no budget.
TestCoreScriptBudget now passes.
- Full Go suite at 41737d214 (on 802fb6e61): all 69 packages ok.
- Whole GUI suite at 41737d214 (11,741 tests, 5.8h at load ~250): 48 red,
none from this change.
- Red the same on origin/main 45593cc1d, all filed: quota-count-wrap
and quota-name-translated (#2228), quota-reads (#2150), s3-sync
(#2448), usage-agents-hide (#2276), usage-checkin (#2549, #3091),
usage-fold (#2163), usage-ledger (#3104, #3001).
- Red under load only and green alone: agent-notice-lang (#2960),
agent-stale-copies (#1949), modal-morph (#3179), plugin-card-update
(#3079), plugin-github (#3218), and agent-field-names and
api-key-theme (filed as #3307).
- Also seen red once under load: codex-subagent-model's fixed 300ms
wait (#3277).
Not tried:
- a real Claude Code run reading the written settings;
- the Windows box;
- the whole GUI suite again after the string was shortened (only the
files above were run);
- the tray panel (#3308).