Skip to content

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

Closed as duplicate

Description

@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:

    [features]
    multi_agent = true
    
    [agents.scout]
    config_file = "~/.codex/agents/scout.toml"
  2. ~/.codex/agents/scout.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."""
  3. Run:

    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."
  4. 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

Activity

  1. added
    bug
    CLI
    exec
    subagent
    on Jul 17, 2026
  2. github-actions commented on Jul 17, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. etraut-openai commented on Oct 12, 2026

    @etraut-openai
    Contributor

    (response from codex)

    Closing as a duplicate of #33667. In both 0.144.5 reports the named role is found, but the child's recorded model and effort silently inherit the parent's instead of the TOML pins. This exec reproduction adds both Luna and Terra child pins and a Sol/high parent; please keep those cases in scope on #33667. We are not claiming the bug is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIbugexecsubagent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions