cleverpigo (Windows, Codex App 26.1027.6604.0) had Codex's lead on
WorkBuddy's DeepSeek-V4.1-Flash, the subagent model on what the GUI called
"Same as the lead", and the Routing page still showed a subagent on
gpt-5.6-sol through Codex's own sign-in.
Cause: that setting, unset, never held a subagent to anything. Since
67c8f562c (mengxiao) a subagent keeps the model its lead names in
spawn_agent (codexFollowTo leaves subagents alone; codexSubagentPick
returns nil with nothing set), and Codex lists its own models first under
spawn_agent's model overrides, so the DeepSeek lead named gpt-5.6-sol.
Codex's side calls use luna, terra or codex-auto-review, not sol, so it
was the subagent, not a side call.
Now:
- "lead" (settings.CodexSubagentLead / provider.CodexSubagentLead) is a
value of CodexSubagentModel: every Codex subagent goes on the model the
lead's own turns last went on (codexLeads.lookup), whatever it names.
The trace says so (SubagentPick.Lead) and Routing tells it as "the
model its lead is on".
- A lead on one of Codex's own models is followed on the ChatGPT backend
route only; in serve such a lead leaves the request as asked. With no
lead turn seen, a subagent goes as asked.
- The GUI's picker offers "Lead's pick" (unset, mengxiao's case, as
before) and "Same as the lead" (the new value); the texts say which one
holds the subagents. en, zh, zh-TW, ja and de.
- No prompt text sent to a vendor changes.
Users who had it unset stay on Lead's pick; the label now says what it
does, and they pick Same as the lead to hold their subagents.
Docs: agent-wiring.md (subagent model field), gateway-routing.md
(CodexSubagentModel paragraph).
Ran, on mote through mote-run at this tree (base origin/main 50265256b):
- go test -tags nogui ./internal/gateway (whole package, -timeout 45m): ok
- go test -tags nogui ./internal/provider ./internal/settings
./internal/settingsapi: ok; -run Codex ./internal/agent ./internal/gui:
ok; -run Budget ./internal/gui (TestCoreScriptBudget): ok
- go vet ./..., GOOS=windows go vet ./..., GOOS=linux go vet -tags nogui
./... (and -tags nogui darwin/windows): clean; gofmt -l: nothing
- node --test, both engines: codex-subagent-model (now picks Same as the
lead and back, sheet row, Routing story of a lead-moved subagent, five
languages), codex-subagents-lead, i18n-keys, routing-request-model,
routing-sealed-task: pass. routing-story-shrinks is red in WebKit (4
subtests, "held while under way"), the same alone at origin/main
50265256b: #3954.
Broken by hand (in mote's copy only):
- lead lookup turned off in codexSubagentPick: both new tests red
(TestCodexSubagentFollowsTheLeadWhenSet: "ChatGPT was asked for
[gpt-5.6-sol]", the reporter's case).
- codexBackend's gate back to bare models only:
TestCodexSubagentFollowsALeadOnCodexsOwnModel red.
- On the old code the tests don't build (no "lead" value), and
SetCodexSubagentModel refused "lead".
Not tried: a real Codex App/CLI with a DeepSeek lead spawning a subagent,
and nothing on Windows (the change has no OS-specific path). The whole GUI
suite wasn't run: mote had two other sessions' full GUI suites going.