codex exec: registered agent TOML model / model_reasoning_effort ignored — subagents inherit the parent model (0.144.5)

Open 💬 1 comment Opened Jul 17, 2026 by ussi69-dotcom

What version of Codex CLI is running?

codex-cli 0.144.5 (npm @openai/codex, current latest)

What subscription do you have?

ChatGPT (personal)

Which model were you using?

Parent session: gpt-5.6-sol (reasoning effort high)

What platform is your computer?

Linux x86_64 (musl binary from @openai/codex-linux-x64)

What issue are you seeing?

Registered agent TOML files pin model and model_reasoning_effort per the
subagent documentation
("Optional fields such as … model, model_reasoning_effort … inherit from the parent
session when you omit them" — i.e. they should apply when present). In codex exec on
0.144.5 they are ignored: the spawned subagent thread runs with the parent session's
model and effort.

Reproduced with two different pinned agents in the same setup:

  • agent pinned model = "gpt-5.6-luna", model_reasoning_effort = "low" → child thread

turn_context: model=gpt-5.6-sol, effort=high (the parent's);

  • agent pinned model = "gpt-5.6-terra", model_reasoning_effort = "high" → child

thread turn_context: model=gpt-5.6-sol.

So this is not the luna-only restriction discussed in #31814's comments — the pin is not
applied at all.

Steps to repro

  1. ~/.codex/config.toml:

```toml
[features]
multi_agent = true

[agents.scout]
config_file = "~/.codex/agents/scout.toml"
```

  1. ~/.codex/agents/scout.toml:

``toml
name = "scout"
description = "Fast read-only repository explorer."
model = "gpt-5.6-luna"
model_reasoning_effort = "low"
sandbox_mode = "read-only"
developer_instructions = """Stay in exploration mode."""
``

  1. Run:

``bash
codex exec --skip-git-repo-check \
"Delegate exactly one task to the registered 'scout' agent: the task text is: \
Reply with exactly the single word READY and do nothing else. After the scout \
returns, report verbatim what it replied and stop."
``

  1. Inspect the child rollout under ~/.codex/sessions/…: the spawned thread has

session_meta.thread_source = subagent with the parent thread id and
agent_path = /root/scout, but its turn_context records model = "gpt-5.6-sol",
effort = "high" — the parent's values, not the TOML pins.

What did you expect to happen?

The subagent thread runs with the TOML-pinned model / model_reasoning_effort
(gpt-5.6-luna / low), or delegation fails loudly if the pinned model is not allowed
as a subagent — silent inheritance of the parent model makes cost/tier expectations
wrong without any signal.

Additional context

  • Related: #16548 (spawn_agent ignores requested model, 0.118), #31814 (closed —

MultiAgent V2 hide_spawn_agent_metadata removed model/reasoning_effort from the
model-visible spawn_agent schema; on 0.144.5 that setting is not user-configurable:
--strict-config -c <table>.hide_spawn_agent_metadata=false reports unknown field for
every plausible table), #32510.

  • Telemetry strings in the binary include requested_model / requested_reasoning_effort

for delegated subagents, so the request layer is aware of the concept; the pins just
never reach the child thread in codex exec.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗