Problem
On a Codex (ChatGPT subscription) bot, normal turns worked but subagents and Auto review failed. Both built their own non-streaming model requests instead of using the bot's normal transport. Codex requires stream: true and rejects the reviewer's output-token cap. The Mastra Codex middleware also inserted generic CLI instructions in place of the bot's own.
Goal
Subagents (children) and Auto review reviewers build their model the same way as the bot's normal turns: same instance credentials, endpoint, model, and model options, streamed. Children keep the bot's instructions and their assigned task.
Deliberate behavior changes:
- The reviewer inherits the bot's reasoning settings instead of a forced low setting.
- Codex OAuth requests omit the unsupported output-token limit; API-key transports keep it.
- Standard OpenCode cannot run Auto review. The review asks the human instead, with an explicit reason.
Acceptance criteria
How to verify
vp test run apps/server/src/provider
Then, on an isolated dev server with a Codex subscription, ask a bot to run a subagent and trigger Auto review, and confirm both stream and finish.
Context
- Committed locally on the branch
cos/child-model-routing as c21164ace fix(server): stream subagents and reviews on the bot transport, with internal and user docs and a patch changeset. Follow-up d2e47b4c8 makes the Claude child-transport test clear ANTHROPIC_BASE_URL and similar variables so it passes in shells that proxy Anthropic. The commit is also merged into cos/orchestration-proactive, cos/subagent-rows, and other cos/ branches. Not on main, no PR.
- Verification (2026-10-06): provider and orchestration sweep 339 files and 2346 tests passed (2 files and 6 tests skipped); server
tsgo typecheck and lint on changed files passed; fake-fetch transport and child-runner tests 14 passed. On the base commit, 4 of these failed; the Codex output-limit regression failed 2 before the fix and passed 4 after. An independent GPT-6.1 Sol review (Standard, medium) found no remaining issues.
- Not checked: live subscription end to end. The coordinator owns integrated verification; the worker was not allowed to start servers.
- Related: AKR-144 (how subagent runs show in the chat).
Created with GPT-6.1 Sol in T3 Code Codex harness. Restructured with Claude Opus 5.5 in Claude Code.
Problem
On a Codex (ChatGPT subscription) bot, normal turns worked but subagents and Auto review failed. Both built their own non-streaming model requests instead of using the bot's normal transport. Codex requires
stream: trueand rejects the reviewer's output-token cap. The Mastra Codex middleware also inserted generic CLI instructions in place of the bot's own.Goal
Subagents (children) and Auto review reviewers build their model the same way as the bot's normal turns: same instance credentials, endpoint, model, and model options, streamed. Children keep the bot's instructions and their assigned task.
Deliberate behavior changes:
Acceptance criteria
mainHow to verify
vp test run apps/server/src/providerThen, on an isolated dev server with a Codex subscription, ask a bot to run a subagent and trigger Auto review, and confirm both stream and finish.
Context
cos/child-model-routingasc21164acefix(server): stream subagents and reviews on the bot transport, with internal and user docs and a patch changeset. Follow-upd2e47b4c8makes the Claude child-transport test clearANTHROPIC_BASE_URLand similar variables so it passes in shells that proxy Anthropic. The commit is also merged intocos/orchestration-proactive,cos/subagent-rows, and othercos/branches. Not onmain, no PR.tsgotypecheck and lint on changed files passed; fake-fetch transport and child-runner tests 14 passed. On the base commit, 4 of these failed; the Codex output-limit regression failed 2 before the fix and passed 4 after. An independent GPT-6.1 Sol review (Standard, medium) found no remaining issues.Created with GPT-6.1 Sol in T3 Code Codex harness. Restructured with Claude Opus 5.5 in Claude Code.