fix: stop pinning spawn_agent agent_type and child model - #87
Merged
Conversation
Codex 0.145 only advertises `spawn_agent.agent_type` when custom agents are configured, and its child-model catalog no longer contains `gpt-5.4-mini`/`gpt-5.4`. The built-in review, adversarial-review, and rescue forwarding contracts pinned both, so every background forwarding spawn hit an unadvertised parameter and an unavailable model. Omit `agent_type` (an omitted value already selects the built-in default agent) and omit `model` so the child inherits the parent model, keeping `reasoning_effort: "medium"` for a cheap transient forwarder. Contract tests now assert the absence of any Codex model pin. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Jul 29, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Codex 0.145 changed two things the built-in forwarding contracts depended on:
spawn_agent.agent_typeis only advertised when custom agents are configured ([agents]inconfig.toml). The tool schema isadditionalProperties: false, so the pinnedagent_type: "default"is not a valid argument for a default install.gpt-5.4-miniorgpt-5.4. The advertised overrides are nowgpt-5.6-sol,gpt-5.6-terra,gpt-5.6-luna,gpt-5.5,gpt-5.2, and the tool description explicitly says spawned agents inherit the parent model andmodelshould not be set without a reason.So the review, adversarial-review, and rescue background paths pinned an unadvertised parameter plus an unavailable model, and the documented "retry once with
gpt-5.4" fallback pointed at another model that no longer exists.Root cause
The plugin duplicated host-owned routing state (agent roles, model catalog) in its skill contracts. Both are owned by the Codex CLI and move between releases. The fix removes the duplication at that boundary instead of re-pinning newer names:
agent_type— an omitted value already selects the built-in default agent, in both configurationsmodel— the child inherits the parent model, which is what the host recommendsreasoning_effort: "medium"so the transient forwarder stays cheap and predictablegpt-5.4fallback branchContract tests assert
doesNotMatch(/gpt-5/)on all three public skills so no Codex model name can be re-pinned there.Evidence
CI on
main-based PRs has been red since codex-cli 0.145.0 shipped (14/22 E2E failures, first seen 2026-07-27; the 2026-07-20 run on 0.144 was green). The mock provider captured the new schema:No
agent_type.Validation
Local, with codex-cli 0.145.0:
npm run check— version-sync, changelog, lint, typecheck all pass🤖 Generated with Claude Code