agents.max_depth = 1 permits child-to-grandchild spawning in 0.144.1

Open 💬 1 comment Opened Jul 10, 2026 by EatMyTarts

Codex version

Codex CLI 0.144.1, macOS arm64. This is the latest stable GitHub release as of 2026-07-10.

Configuration

[agents]
max_depth = 1
max_threads = 50

The configuration passes:

codex --strict-config --version

with:

codex-cli 0.144.1

There is no project-local Codex config overriding the user-level agents table.

Reproduction

  1. Start a fresh Codex task.
  2. Have the root thread spawn one direct child.
  3. Have that child make exactly one no-op subagent spawn attempt.
  4. Observe that the spawn succeeds and the grandchild runs.

Observed spawned path shape:

/root/explorer_depth_probe/noop

The grandchild returned only NOOP, so the probe made no repository or external changes.

Expected behavior

The official Subagents documentation says agents.max_depth defaults to 1, the root starts at depth 0, and max_depth = 1 lets the root spawn direct children while preventing those children from spawning deeper descendants:

https://developers.openai.com/codex/subagents

Actual behavior

A direct child successfully spawned a grandchild despite agents.max_depth = 1.

Additional verification

  • All custom agent TOMLs parse.
  • The user config contains exactly agents.max_depth = 1.
  • Codex strict config accepts the setting.
  • No custom agent file defines another agents table or overrides max_depth.
  • The no-op grandchild completed successfully, so this was not only a UI display artifact.

View original on GitHub ↗

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