Skip to content

0.137.0 (ChatGPT account): multi_agent_v2 enabled in config.toml breaks every turn with spawn_agent encrypted-tools 400 #27331

Open

Description

@MumuTW

Summary

With features.multi_agent_v2.enabled = true in ~/.codex/config.toml, every Codex turn fails at API request validation before the model handles the prompt — even when the user does not ask to spawn sub-agents.

Error:

{
  "type": "error",
  "error": {
    "type": "invalid_request_error",
    "message": "Invalid Value: 'tools'. Function 'functions.spawn_agent' declares encrypted parameters but is not configured for encrypted tool use by this model.",
    "param": "tools"
  },
  "status": 400
}

This blocks codex exec background automation (e.g. dispatching Playwright test fixes) because the session never starts.

Environment

  • Codex CLI: 0.137.0
  • OS: macOS 25.5.0 (Darwin arm64, Apple Silicon)
  • Auth: ChatGPT account (codex login status — not API key)
  • Model: gpt-5.5 with model_reasoning_effort=high

Config snippet (relevant)

[features]
multi_agent = true

[features.multi_agent_v2]
enabled = true
max_concurrent_threads_per_session = 10000

I do not recall manually enabling multi_agent_v2; it may have been added during a recent CLI/Desktop upgrade (similar reports in #27205).

Minimal repro

codex exec --ephemeral --skip-git-repo-check -C /tmp 'Reply exactly: DONE'

Fails immediately with the spawn_agent encrypted-tools 400 above.

Workaround (confirmed locally)

Disable v2 for the invocation:

codex exec --disable multi_agent_v2 ...

Or in ~/.codex/config.toml:

[features.multi_agent_v2]
enabled = false

Legacy multi_agent (v1) subagent flow works after disabling v2.

Expected behavior

Either:

  1. The active model/backend supports MultiAgentV2 encrypted tool schemas, or
  2. Codex should not expose encrypted v2 tools (spawn_agent, send_message, followup_task) unless the backend is configured for encrypted tool use, or
  3. Upgrades should not silently enable multi_agent_v2 while the feature is still under development and incompatible with ChatGPT-account backends.

At minimum, enabling multi_agent_v2 should not make unrelated prompts fail at request validation time.

Related issues

Impact

Production automation workflows that rely on codex exec (CI agents, Claude Code dispatch, scripted refactors) fail entirely when v2 is enabled — not just when spawning sub-agents.

Activity

  1. added
    bugSomething isn't working
    CLIIssues related to the Codex CLI
    execIssues related to the `codex exec` subcommand
    subagentIssues involving subagents or multi-agent features
    configIssues involving config.toml, config keys, config merging, or config updates
    on Jun 10, 2026
  2. added
    appIssues related to the Codex desktop app
    regressionBehaviors that worked in previous versions but were broken due to an update
    on Jun 11, 2026
  3. Fearvox commented on Jun 12, 2026

    @Fearvox

    Same here, looks like someone fat-fingured...

  4. Fearvox commented on Jun 12, 2026

    @Fearvox

    Same here, looks like someone fat-fingured...

    For me this happens in Codex Desktop after update when the request includes functions.spawn_agent. New thread/model switch may work, but affected threads fail before assistant response. Seems related to multi_agent_v2 / encrypted tool-use capability gating.

  5. ignatremizov commented on Jun 13, 2026

    @ignatremizov

    This looks related to #26753, #27205, and #27260: the same #26210 MultiAgentV2 encrypted-tool capability failure. When multi_agent_v2 is enabled, Codex exposes encrypted spawn_agent / followup_task tool schemas even if the active model/backend is not configured for encrypted tool use, so the request fails before the assistant can respond.

    Workaround for new CLI sessions:

    codex --disable multi_agent_v2
    # or for exec:
    codex exec --disable multi_agent_v2 ...

    Workaround for Codex App users:

    1. Quit Codex App completely.
    2. Edit your Codex config:
    # macOS/Linux: ~/.codex/config.toml
    # Windows: %USERPROFILE%\.codex\config.toml
    [features.multi_agent_v2]
    enabled = false
    1. Reopen Codex App and start a fresh thread/session.

    If an existing thread still fails after disabling it, the config change is not enough for that old thread. Existing threads persist multi_agent_version = "v2" in rollout history, so resumed old threads will keep sending the encrypted v2 tool schema even after the feature is disabled. That persistence/recovery case is discussed in #27205.

    For custom Responses providers, the same underlying problem applies: the active backend/model has to support encrypted tool use before Codex can expose the v2 spawn_agent / followup_task schemas. This is tracked in #27339.

    Separate but related: #26210 also made v2 subagent task/message data unreadable in rollouts, which makes recovery/debugging harder when these failures happen. I opened #28058 for that auditability issue, please react if it affects your workflow.

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

    CLIIssues related to the Codex CLIappIssues related to the Codex desktop appbugSomething isn't workingconfigIssues involving config.toml, config keys, config merging, or config updatesdogfoodingexecIssues related to the `codex exec` subcommandregressionBehaviors that worked in previous versions but were broken due to an updatesev3subagentIssues involving subagents or multi-agent features

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions