openai / openai/codex

Subagent routing is not fail-closed: incompatible full-history forks silently inherit another model/quota pool (0.149.0)

Open
#40,016 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug CLI model-behavior rate-limits subagent
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of Codex CLI is running?

codex-cli 0.149.0, the current npm release at the time of this report.

What subscription do you have?

ChatGPT Pro 20x.

Which models were you using?
  • Affected coordinator: GPT-5.6 Terra, medium reasoning.
  • Requested child model: GPT-5.3-Codex-Spark, low reasoning.
  • Actual affected children: GPT-5.6 Terra, medium reasoning.
  • Controls: GPT-5.3-Codex-Spark low and GPT-5.6 Terra low.
What platform is your computer?

Ubuntu 24.04, Linux x86_64, Konsole under tmux.

Codex doctor report

codex doctor --json reported overall status OK. ChatGPT authentication,
provider reachability, WebSocket handshake, config parsing, and installation
checks passed. multi_agent and multi_agent_v2 were enabled.

What issue are you seeing?

Subagent model routing does not fail closed when a coordinator chooses a
full-history fork that is incompatible with the model the user requested.

In a long-running conversation, the user requested a Codex Spark fleet. After
a fresh restart exposed native delegation, the coordinator said it was starting
and operating that requested fleet.

It issued 26 spawn_agent calls. Every call used fork_turns: "all" and
omitted both model and reasoning_effort. Twenty-five child rollout files
were created; all 25 inherited the Terra-medium coordinator and reported the
ordinary weekly Codex pool. No affected child ran Spark.

The incompatibility is reproducible:

  1. A bounded explicit Spark-low spawn with fork_turns: "none" succeeds, and
    the child runtime records Spark low with separate five-hour and weekly
    windows.
  2. A bounded explicit Terra-low spawn with fork_turns: "none" succeeds, and
    the child runtime records Terra low.
  3. A fresh coordinator instructed to combine Spark low with
    fork_turns: "all", and to fail closed, reports that full-history forks
    cannot accept model or reasoning-effort overrides and correctly spawns no
    fallback.

The affected long-running coordinator encountered the same incompatibility but
did not fail closed. It silently emitted model-omitting full-history spawns and
continued the workflow with Terra children.

What steps can reproduce the bug?
  1. Start a parent on model A.
  2. Ask it to orchestrate model B subagents, where B has a materially different
    quota bucket.
  3. Have the coordinator choose full-history forks.
  4. Observe that fork_turns: "all" is emitted without model or
    reasoning_effort.
  5. Inspect the child rollout and observe that it silently inherited model A.
  6. Observe that the normal subagent surface does not disclose the resolved
    model, setting source, or quota bucket.

Across 52 in-window spawn calls in the audited corpus:

  • 17 explicit model requests matched actual child runtime records.
  • 0 explicit model requests mismatched.
  • 33 calls omitted model and effort and inherited or used role defaults.
  • 2 calls had no child rollout record.

This report does not claim that explicit routing always fails. It reports that
an incompatible full-history choice can silently discard user-requested model
identity and quota expectations.

What is the expected behavior?
  • If requested child model B cannot be combined with the chosen fork mode,
    Codex must reject the spawn rather than silently inherit parent model A.
  • An explicit user model request should be strict unless the user authorizes a
    fallback.
  • The subagent UI and status API should show the resolved model, reasoning
    effort, setting source (explicit, role pin, inherited, or fallback), and
    effective quota bucket before and during execution.
  • The coordinator should not claim the requested fleet is running until runtime
    metadata confirms the child model.
Additional information

Related but distinct reports:

  • #32283 — resolved subagent model and reasoning effort hidden in the UI
  • #33881 — configured subagent model pins and inheritance
  • #36432 — missing model-to-rate-limit-bucket mapping
  • #23150 — Spark usage appearing in regular and specialized buckets

I can provide exact thread identifiers and sanitized rollout-derived metadata
privately to maintainers if requested. No chat content, prompts, project names,
local paths, account identifiers, or credentials are included in this report.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the spawn_agent handling and trace how fork_turns: "all" resolves omitted model and reasoning_effort values for child rollouts. Reproduce the bounded explicit and full-history cases, then verify that an incompatible requested model is rejected rather than inherited and that the resolved model, effort, setting source, and quota bucket are surfaced before execution.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.