@m0eaki on X (Codex 0.169): spawn_agent listed only Codex's first five
models, though a remote magpie's model could be spawned by its full slug.
In Codex 0.169 a lead on one of OpenAI's own models (the Codex App's
default) sends Lite requests (use_responses_lite), with no top-level
tools: in multi-agent V2 spawn_agent sits in an additional_tools input
item, and with features.model_catalog_in_context the models are in a
<model_catalog> developer message, spawn_agent pointing there. magpie
widened only tools and tool_search_output, so neither was reached.
spawnAgentModels now widens additional_tools like a tool_search_output,
and adds the rest of the catalog to a <model_catalog> listing ahead of
its closing tag, under the same neutral spawnMore line (no magpie, Codex
or count named). The listing is found escaped too (<model_catalog>):
on CodexPath a followed or moved subagent's body goes through withModel,
whose encoder escapes angle brackets, before spawnAgentModels sees it.
Fixtures are real Codex 0.169.0 captures (second request of a turn, sandbox
CODEX_HOME, gpt-5.6-luna): V2 Lite, model_catalog_in_context, Lite with a
tool search, and a plain tool search. TestSpawnAgentNamesEveryModelInCodex0169
posts each at CodexPath with a lead on OpenAI's model, and calls
spawnAgentModels with a lead on magpie's at CodexPath and /v1, the body as
Codex wrote it and as withModel writes it again.
Sibling left alone, filed: #6639 (a Lite request reshaped for a provider
that takes neither Lite's items nor a tool search drops the tools its lead
searched for).
Run:
- Old codex_spawn_models.go: V2 and model_catalog red on all 5 routes
each (10 subtests); the two tool-search shapes passed before too.
- Broken by hand: hasSpawnCatalog matching only the raw form: the three
escaped-body model_catalog subtests go red. Restored, green.
- gofmt -l clean. go vet ./internal/gateway and GOOS=windows go vet ./internal/gateway (./... needs Wails' cgo, which the VM lacks), and
go test ./internal/gateway -count=1 -timeout 45m: vet clean, gateway ok (861s), at base d987cc7d5. Rebased on 69946f43c (gateway: masked_checked_test.go, native.go changed); there vet and -run "Spawn|Codex" ok (187s)
- Ran in the Linux VM (wsl-run): mote was at load 25-27 on 18 cores and
mica's disk was full (595MB free, 64G shared Go cache), so no full
./... suite was run on a Mac. Not tried: a real Codex App session.