Add global subagent runtime defaults for model, provider, and reasoning

Resolved 💬 2 comments Opened Jun 6, 2026 by bakaburg1 Closed Jul 16, 2026

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:

  1. Explicit spawn override
  2. Matching agent TOML
  3. Global [subagents] defaults
  4. 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.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗