Add global subagent runtime defaults for model, provider, and reasoning
Problem
Subagents often do cheaper parallel work: exploration, log inspection, scans, test triage, and summarization. I want the main agent to use a strong model, but default subagents to a cheaper/faster model, a different provider, or even a local model to reduce cost, latency, and quota usage.
Today this seems to require per-agent TOML files under ~/.codex/agents/. That mixes runtime policy with agent definition: changing only model, model_provider, or model_reasoning_effort can force users into redefining agent metadata/instructions such as developer_instructions.
Proposal
Support global subagent runtime defaults in ~/.codex/config.toml:
[subagents]
model = "gpt-5.4-mini"
model_provider = "azure"
model_reasoning_effort = "low"
These should apply to spawned subagents by default and be overridable by individual agent TOML files.
Suggested precedence:
- Explicit spawn override
- Matching agent TOML
- Global
[subagents]defaults - Parent session / built-in defaults
This separates cost/control policy from behavioral customization. Users could keep built-in subagent instructions intact while routing subagents to cheaper hosted providers or local models by default.
---
Drafted by Codex and reviewed by me before submission.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗