Subagents sometimes spawned with service_tier=priority

Open 💬 4 comments Opened Jun 25, 2026 by codengine

What version of Codex CLI is running?

0.142.0

What subscription do you have?

Pro 20x

Which model were you using?

gpt-5.4

What platform is your computer?

Linux 6.18.33.1-microsoft-standard-WSL2 x86_64 x86_64

What terminal emulator and version are you using (if applicable)?

Windows Terminal

Codex doctor report

What issue are you seeing?

I usually have Fast Mode turned off and its also the default in config.toml.

However, in one session I saw that the main agent spawned a subagent with FastMode=On. I asked how this could have happened and it turns out there is a service_tier=priority mode that can be used during spawning subagents.

This is a critical issue as it undermines the global policy, the setting for the main agent and silently swallows tokens for breakfast.

What steps can reproduce the bug?

The main agent randomly selects whether the subagent should be spawned with Fast Mode or not - I can not reliably reproduce it.

What is the expected behavior?

Spawned subagents should receive the same service tier as the main agent by default.

Additional information

_No response_

View original on GitHub ↗

4 Comments

Nicolas0315 · 2 months ago

I pushed a candidate fix to my fork:

What changed:

  • removed service_tier from the v1/v2 spawn_agent tool schemas so the model is not invited to choose Fast Mode for subagents;
  • stopped copying a tool-supplied service_tier into the child config before role application;
  • reject spawn_agent service-tier requests that differ from the inherited parent tier or explicit role tier, while preserving user-defined role service_tier configs.

Local validation on Windows (RTX4090):

  • just fmt
  • just test -p codex-core service_tier (38/38)
  • just test -p codex-core spawn_agent_tool (6/6)
  • just test -p codex-core multi_agent_feature_selects_one_agent_tool_family (1/1)
  • cargo build -p codex-windows-sandbox --bin codex-windows-sandbox-setup --bin codex-command-runner
  • just test -p codex-core windows_elevated_enforces_deny_read_and_protects_setup_marker (1/1)
  • git diff --check

SSH validation:

  • RTX4090 over SSH: commit ffa0bf7, git diff --check, just test -p codex-core service_tier passed (38/38).
  • Nicolas-MacBook-Pro.local over SSH: commit ffa0bf7, git diff --check, RUST_MIN_STACK=8388608 cargo test -p codex-core service_tier, spawn_agent_tool, and multi_agent_feature_selects_one_agent_tool_family passed. just test could not run because cargo nextest is not installed on that host.
  • nicolas2025 Windows over SSH: commit ffa0bf7, git diff --check, RUST_MIN_STACK=8388608 cargo test -p codex-core service_tier, spawn_agent_tool, and multi_agent_feature_selects_one_agent_tool_family passed. just test could not run because cargo nextest is not installed on that host.
  • nicolas2025 WSL over SSH: commit ffa0bf7 and git diff --check passed; Rust test build is blocked by missing pkg-config/OpenSSL dev packages.
  • RTX5060Ti over SSH: commit ffa0bf7 and git diff --check passed; Rust test build is blocked by the host's MSVC linker setup (link.exe treats object files as extra operands).

A full just test -p codex-core on my Windows checkout still has a local environment failure in responses_stream_includes_turn_metadata_header_for_git_workspace_e2e: this checkout's origin is git@github.com:openai/codex.git, while the test expects https://github.com/openai/codex. The service-tier and spawn-agent focused tests pass.

I also tried to open the upstream PR from the pushed branch, but GitHub rejected it with GraphQL: Nicolas0315 does not have the correct permissions to execute CreatePullRequest (createPullRequest).

dtsepelev · 1 month ago

Same here. Model gpt-5.5, codex cli v0.142.5, platform macOS Tahoe 26.4

One of the problem is that the fast mode is not visible in the CLI UI, so I figured where the quota going only after I've noticed a huge drain and manually expecting each agent.

codengine · 1 month ago
Same here. Model gpt-5.5, codex cli v0.142.5, platform macOS Tahoe 26.4 One of the problem is that the fast mode is not visible in the CLI UI, so I figured where the quota going only after I've noticed a huge drain and manually expecting each agent.

You can enable it in the CLI UI. Just type /statusline

dtsepelev · 1 month ago
> Same here. Model gpt-5.5, codex cli v0.142.5, platform macOS Tahoe 26.4 > One of the problem is that the fast mode is not visible in the CLI UI, so I figured where the quota going only after I've noticed a huge drain and manually expecting each agent. You can enable it in the CLI UI. Just type /statusline

Sure, you can see the tier for the current agent, but you can't see it for a sub-agent until you switch to it. So when your parent agent spawns a bunch of priority agents – you don't know this until you inspect each agent separately. Instead, you see just effort like "Spawned Rawls [worker] (gpt-5.5 high)" in the chat history