Skip to content

--disable multi_agent still lets gpt-5.6-sol spawn subagents (multi_agent_version v2 models) #50880

Closed as duplicate

Description

@andrewfree

Version: codex-cli 0.160.0, macOS on Apple Silicon.

--disable multi_agent does not remove the collaboration spawn tool for models whose catalog entry sets multi_agent_version = "v2". A headless run that is meant to stay single-agent can still start subagent threads.

Repro (outside any git repo, no user config):

codex exec --ignore-user-config --disable multi_agent -m gpt-5.6-sol \
  -c 'model_reasoning_effort="low"' --sandbox read-only --skip-git-repo-check --json \
  'Use your spawn_agent collaboration tool with fork_turns set to "none" to start exactly one subagent whose only task is to reply OK. Then reply with exactly what happened: the subagent reply, or the exact error text. If you have no such tool, reply NO_SPAWN_TOOL.' < /dev/null

Result: the run spawns a subagent. Its rollout's session_meta.source is {"subagent": {"thread_spawn": {"parent_thread_id": "<exec thread>", "depth": 1, ...}}}, and the final message is OK. The --json stream has no item for the spawn itself, only a collab_tool_call with tool: "wait" and empty receiver_thread_ids.

Expected: --disable multi_agent removes the spawn tools for every model, including models whose catalog entry sets multi_agent_version = "v2".

Notes from earlier testing on 0.160.0:

  • The same happens with the GPT-6 models.
  • None of these prevent the spawn: features.multi_agent_v2.enabled = false on its own, agents.max_depth = 0, or excluding the collaboration namespace from code mode.
  • The only setting found that refuses spawns is features.multi_agent_v2={enabled=false, max_concurrent_threads_per_session=1}. The call then fails with collab spawn failed: agent thread limit reached.

Possibly related: #46704 (max_depth not enforced for nested spawn_agent), #36519 and #49736 (PreToolUse does not apply to spawn_agent).

Activity

  1. added
    bug
    CLI
    subagent
    config
    exec
    on Oct 4, 2026
  2. etraut-openai commented on Oct 12, 2026

    @etraut-openai
    Contributor

    (response from codex)

    Closing as a duplicate of #35177, which tracks v2 subagent spawning despite the multi_agent=false setting. This 0.160.0 low-effort test usefully shows the problem is not limited to ultra or large swarms. Please add/track that minimal reproduction there; the fix needs to honor the disable flag for all v2 model effort levels.

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

    CLIbugconfigexecsubagent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions