ac4af582301a4e8a29245dbba767eba31334ddf9
8
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
50aaa57268 |
agents: Codex's Lead's pick, already chosen, still takes away the config's subagent model
luckymanjc (Discord) set Codex's subagent model to Default (Lead's pick)
on the Agents page, but ~/.codex/config.toml kept [agents]
default_subagent_model = "gpt-6.1-terra". Restarting magpie and Codex
didn't clear it, so every subagent ran on Terra. The card said "Codex's
config still starts subagents on gpt-6.1-terra when the lead names none;
picking here replaces it". But magpie's own setting was already "", and
commit() returns when a pick equals the current value, so nothing was
sent. The backend's Set("") does take the key away (internal/agent/
codex.go, subagent_model). Now Lead's pick is sent while Codex's config
still has a subagent model; it still sends nothing when there is none.
magpie writes that key through Codex's own subagents square, which the
card no longer draws once magpie's subagent model is offered. Nothing
records whether magpie or the user wrote it. The owner's rule is that a
pick in the subagent model takes it away, and the card says so. [agents]
default_subagent_reasoning_effort ("low" here) is left alone: it is the
subagent effort square on the card, which can be set to Default there.
Run (mote):
- codex-subagent-model.test.cjs: 20/20 in Chromium and WebKit, in en,
zh, zh-TW, ja and de, at 1100 and 560px. The square now starts as the
reporter's case: Lead's pick with a model in Codex's config. Picking
Lead's pick posts "", and a second pick with nothing left posts
nothing.
- Broken by hand: with the old `if (value === field.value) return;`,
2/2 red (chromium en; waitForFunction timed out, nothing sent).
- codex-subagents-lead 20/20, subagent-effort 4/4, i18n-keys 4/4,
go test -run Budget ./internal/gui: ok. After a rebase it was 285 bytes
over, so the inline comment went into codexSub's comment and the check
got shorter. app.js is 189 bytes smaller than its base; the budget was
not raised. Rerun at that tree: 20/20 and 20/20, and red on the old
code.
Not tried: the real app against a real ~/.codex (sandbox only; ~/.codex
was not touched), and Windows and Linux.
|
||
|
|
1e1068c86c |
codex: "Same as the lead" holds every subagent to the lead's model (cleverpigo on X)
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 |
||
|
|
ce8b67de37 |
gui tests: a page's first load gets a minute, not a click's 5s (#4470)
claude-switch-only set page.setDefaultTimeout(5000) and then called page.goto with no timeout of its own, so Playwright held the first load of app.js, i18n.js and the plugins to the 5s bar meant for clicks. On a busy box (a whole-suite run at load 130-160) that load took longer and goto timed out. The same pattern is in 988 GUI test files (1174 pages): every one of them now also sets setDefaultNavigationTimeout(60000) on the same page, right after its default, so goto, reload and waitForURL wait on the load itself with room, while clicks and waits keep their short bar. group-from-model-add's own 20s navigation bar is raised to the same minute. claude-switch-only also gives its first provider row (drawn from the page's first reads) a minute before clicking it. nav-timeout.test.cjs (no browser) reads every GUI test file and names each page given a default under a minute without a navigation timeout of at least a minute, so a new file can't bring the pattern back. What was run (WSL magpie-desktop, Playwright 1.62.0, load 70-260 from other sessions): - node --check on every file in internal/gui/tests: all parse. - nav-timeout.test.cjs against origin/main's test files: red (names the 1174 pages); against this tree: its only reds were my own probe copies of the old files, since removed. - By hand: claude-switch-only with app.js served 7s late (a busy box's first load), --test-name-pattern "1100 en": origin/main's file 4 of 4 red with "page.goto: Timeout 5000ms exceeded"; this file 4 of 4 green. - claude-switch-only.test.cjs, both engines, en/zh/ja/de, 1100 and 420: 32 of 32. group-from-model-add, usage-access-key-card and i18n-keys: green. agent-plugin-agents: Chromium green; WebKit's de 420 subtest red on a 5s waitForFunction at line 115 (a wait after load, not the navigation), at load ~230. Not tried: the whole GUI suite (about 1000 files; the change is one mechanical line per page), Windows or mote (mote's browsers, #4125). |
||
|
|
06950fbbbb |
gui: Codex's two subagent settings say which is the default and which holds every subagent
HoGee_xxl on X read Codex's "subagent model" as the default for a
subagent the lead names none for, and found every subagent held to it.
The two read alike ("subagents" / "subagent model"), so each now says
what it is, in en, zh, zh-TW, ja and de. Wording and notes only:
- subagent model, unset: the lead picks each subagent's model, one it
names none for runs on the lead's model, a resumed subagent stays on
the model it started on, and a pick here holds every subagent even
when the lead names another.
- subagent model, set: every subagent on it even when the lead names
another; Same as the lead gives the pick back.
- subagents (Codex's default_subagent_model): the model a subagent
starts on when the lead names none; the lead may still name another.
- Codex's settings row "Codex subagent model" shows that line as a .sub
note under its name, as the rows beside it do, not only on hover (the
empty note is in index.html).
app.js stays under its budget with no raise (1,311,673 of 1,311,681):
the comments beside these strings were condensed.
Run (mote-run, Chromium and WebKit, every language):
- node --test codex-subagent-model, codex-subagents-lead, i18n-keys,
codex-memories, codex-memories-settings, codex-start-model-field,
context-tune, gateway-mode, subagent-effort, agent-tweak-fold,
claude-auto-mode, claude-subagent-effort-row, claude-subagents-pick,
desktop-subagent-model: 227 of 248 ok on the first run; 20 reds were
"browserType.launch: Timeout 180000ms" with mote at load 71 and 43
Chrome processes from other runs, one a desktop-subagent-model zh
420px routing wait. The five files with reds, rerun one at a time:
76 of 76 ok.
- After the budget trim: codex-subagent-model + codex-subagents-lead
40 of 40 ok (concurrency 1; at concurrency 2 under load 52 the first
chromium en case of each was red, #2645's class), i18n-keys ok.
- go test ./internal/gui: TestCoreScriptBudget ok. AppKit window tests
killed at their deadlines at load 71-105 (#2645) pass rerun, except
TestMainWindowCorners/macOS_26_SDK, red the same way on origin/main
|
||
|
|
3ee37aea64 |
gui: Codex's card has no subagent-model or memories square beside its settings rows
Codex's sheet has "Codex subagent model" and "Codex memories model" as
named rows (renderCodexSubagentModel, renderCodexMemories), just under
the card, and the card also drew a square for each: the same setting
twice (the owner, 10-25, a screenshot of the notebook square beside the
memories row). The squares are no longer drawn for the Codex those rows
read (id "codex", not gateway mode); they are left out of the extras
count and of the extras toggle too. A Codex in WSL, which the rows don't
read, keeps its squares.
Tests: codex-memories and codex-subagent-model run the square on a WSL
Codex and check Codex's own card has none; codex-subagent-model picks
and resets through #codexSubagentModelRow; codex-memories-settings
resets through the row instead of the square.
Run: GUI codex-memories, codex-memories-settings, codex-subagent-model,
codex-subagents-lead, desktop-subagent-model, Chromium and WebKit, every
language and width they have: 82 of 82. Earlier run of these plus
codex-start-model-field, subagent-effort, agent-prefs, agent-tweak-fold,
gateway-mode and mobile-web at concurrency 4: only the expected square
reds plus two page.goto/click timeouts under load (codex-subagents-lead
webkit zh-TW 560, desktop-subagent-model webkit zh 1100), both green in
the 82-of-82 run. After the rebase on origin/main the change was trimmed (one sq helper
for the extras toggle and count) and the budgets raised to its size:
app.js 1,322,537, core 1,530,050, with no room added (TestCoreScriptBudget
ok). Rerun at that tree: codex-memories, codex-memories-settings,
codex-subagent-model, agent-tweak-fold, gateway-mode, 58 of 60; the two
reds are gateway-mode's masking tab, red the same on origin/main
|
||
|
|
1cdc3a59fe |
gui: Codex has one subagent model, Same as the lead or one model for every subagent
The owner, looking at Codex's New sessions line: two squares, subagents
and subagent model, read alike and nobody could tell them apart ("这两个
用户压根分辨不出来区别"). One was Codex's own [agents]
default_subagent_model, a model a subagent starts on only when its lead
names none; the other magpie's, which puts every subagent on one model
whatever the lead asks for. They are one setting now:
- Codex's card shows the subagent model alone. Unset it says "Same as
the lead" (跟主代理一样): each subagent runs on the lead's model, or on
another the lead picks for it. A model picked: every subagent runs on
it, whatever the lead asks for. Its picker opens on Same as the lead,
the lead's model in the note. With no model of magpie's to pick there,
Codex's own square stays as it was.
- Codex's sheet has the same setting as a row with a name, Codex
subagent model, beside Codex subagents on any model, as the memories
model got one when its square wasn't found (Hu9956).
- A model Codex's config still has in [agents] default_subagent_model
is said on the square, which is lit: "Codex's config still starts
subagents on {model} when the lead names none; picking here replaces
it."
For users who set default_subagent_model themselves: a pick in the
subagent model, Same as the lead too, removes it from Codex's config
(and a subagent effort the subagents' model no longer has), so the one
setting shown is the one that holds. Until they pick, it stays and is
said on the square. The CLI and profiles keep the subagents field.
Claude Code's, omp's and Claude Desktop's subagent squares are unchanged.
Every new string has zh, zh-TW, ja and de. app.js grows 4,011 bytes,
the Agents page's, which the tray panel draws too: the core budget is
raised to it, with no room added, and says why.
|
||
|
|
221e24a3c7 |
agents, gateway: Codex's subagent model offers every provider's models, not only ChatGPT's (#1633, laacmilan)
The Agents page's Codex "subagent model" field (settings.CodexSubagentModel,
which the gateway puts x-openai-subagent collab_spawn requests on) listed
only the ChatGPT accounts' models, and its setter refused any other
provider's. A user whose lead runs on a chat provider (Token中心, 智谱Plan)
couldn't put its subagents there.
- provider: CodexSubagentModels is Codex's shown catalog
(CatalogFor("codex"), so hidden or unpicked models stay out), ChatGPT
accounts first, routing groups included. SetCodexSubagentModel takes any
provider/model or group id, refuses a bare Codex name.
CodexSubagentUnserved says "magpie doesn't serve it now" for a non-ChatGPT
id that isn't served. CodexAccountModel exported.
- gateway: codexSubagentPick gets the body. When the lead ran on the
ChatGPT backend the task arrives sealed (encrypted_content), and only a
ChatGPT account can open it: set to another provider, such a subagent
stays on the model asked for, with Kept = sealedKept in the route trace
(#1613's constraint; the reverse, a chat lead with a subagent on ChatGPT,
was already handled by
|
||
|
|
189586612e |
agents, gateway: Codex's subagents go on a model set in its row, a ChatGPT account's (willz on Discord)
Codex's lead names each subagent's model itself in spawn_agent, and
Codex's [agents] config can't overrule it. The Agents page's Codex row
now has a "subagent model" square (the app's model picker, Default
first). Its options are only models a ChatGPT account in magpie serves,
because a subagent's task is sealed for ChatGPT accounts.
- settings.CodexSubagentModel holds it. It is an agent Field
(subagent_model), so the TUI/CLI, profiles, davsync's "agents" part
and WSL twins carry it too. The setter refuses another provider's
model. It keeps a ChatGPT account's model that isn't served now, so a
backup restored on another computer still applies (ApplyFields stops
at the first failed Set). POST /api/settings keeps it.
- The gateway (codexSubagentPick) moves a collab_spawn request onto it.
codexBackend does this for Codex's own bare models; serve() does it
for any other model. When no ChatGPT account on in magpie serves it,
or a held gateway key may not use it, the request stays on the model
asked for. Route.Subagent records asked/to/kept. The lead's turns,
titles, guardian and the rest are never moved. Off (the default)
changes nothing.
- Routing page: kindWhy says the subagent was put on the model set, or
stayed on its own and why. "only account on for" names the model it
went on. Strings added in zh, zh-TW, ja and de.
- docs/subsystems: gateway-routing.md and agent-wiring.md describe it.
Run (darwin, rebased on origin/main):
- gofmt -l internal/: clean.
- go vet -tags nogui on gateway, provider, agent, gui and settings:
darwin, GOOS=linux and GOOS=windows.
- go build ./...
- HOME=<temp> go test -tags nogui ./...: all ok.
TestSettingsSaveKeepsWhatItDoesNotSend flagged the new field; it is
now set there.
- GUI tests, Chromium + WebKit:
- codex-subagent-model.test.cjs: 20/20 (en, zh, zh-TW, ja, de at
1100 and 560 px).
- Also green: routing-kind, subagent-effort, codex-memories,
codex-memories-settings, i18n-keys, gui-ja, gui-de, gui-zh-tw and
click-scroll.
Failing without the change (codexSubagentPick returning nil):
- TestCodexSubagentPutOnTheModelSet
- TestCodexSubagentOnAnotherProviderPutOnTheModelSet
- TestCodexSubagentModelNotServedKeepsTheAsked
- TestCodexSubagentModelHeldKeyKeepsTheAsked
TestCodexSubagentModelLeavesOtherRequests guards the other side: the
lead's turns, titles and guardian stay untouched.
Not tried with a real Codex CLI and ChatGPT account. A subagent spawn
needs a signed-in Codex home, and this session may not touch the live
~/.codex. The fake ChatGPT backend tests cover both routes.
|