Skip to content

[Bug]: ChatGPT sharing: Codex is still offered spawn_agent (agents.enabled not disabled), and one spawn permanently poisons the thread (0.1.10) #39101

Open

Description

@aviadr1

Before submitting

Area

apps/server

Steps to reproduce

  1. Use Codex through Connect with ChatGPT (subscription sharing). The rollout shows model_provider_id: "openai_token_sharing", Codex CLI 0.170.0 and gpt-6.2-astra at high effort.
  2. Start a normal top-level thread. Don't use delegate_task, and don't ask for sub-agents.
  3. Have the thread load a skill whose text says "prefer spawning the log-analysis agent". Any skill or AGENTS.md that recommends a helper agent will do.
  4. Codex calls collaboration.spawn_agent (task_name: "log_analysis").

Expected behavior

Under subscription sharing, Codex should not be offered native sub-agents at all, because the backend rejects them. If a spawn does slip through, it should come back as a tool error the turn can recover from, and the thread should stay usable.

Actual behavior

  • T3 injects <multi_agent_mode>… Do not spawn sub-agents unless the user or applicable AGENTS.md/skill instructions explicitly ask for sub-agents…</multi_agent_mode>. That is a soft instruction, and spawn_agent is still in the tool list. The skill text counted as "explicitly asked", so the model spawned.

  • The child session forks, receives its agent_message (NEW_TASK) and fails on its first request.

  • The parent turn then fails with a terminal error: subscription_sharing_unsupported_capability, "User subscription sharing currently supports only text, image, and file messages, item references, additional tools, compaction summaries, reasoning items, Web Search call items, developer function and custom tool call items, and programmatic tool calling items. Remove unsupported input items or use an API key instead." T3 shows this as "Codex used a feature that ChatGPT sharing does not support."

  • The thread is then permanently poisoned. The child's FINAL_ANSWER is stored as an agent_message response item in the parent history, and that item type is not on the allowed list. Every later turn re-sends it and fails within 2–3 seconds. That includes:

    • the answer to a pending request_user_input_async question that Codex had asked earlier in the same turn;
    • a plain follow-up message;
    • a follow-up after switching the model (gpt-6.2-astra → gpt-6.2-sol).

    The only way out was to hand the thread off to a different provider.

Root cause (already identified on #37386)

On #37386 the maintainer reproduced the root cause with Codex 0.169.0. The managed launch args set features.multi_agent=false and features.multi_agent_v2=false. But gpt-6-* models declare multi_agent_version: "v2" in the model catalog, so spawn_agent, wait_agent, send_message and the rest are still offered. Adding -c agents.enabled=false removed them. A failing test was written in apps/server/src/provider/CodexManagedRuntime.test.ts.

The issue was then closed as "not planned / no repro" because no worker has a Connect with ChatGPT login. As of today, CodexManagedRuntime.ts on main still sets only the two features.* flags (lines 28–29), not agents.enabled=false.

Suggested fixes

  1. Add agents.enabled=false to the managed launch args for openai_token_sharing. This is the one-line fix already identified on [Bug]: Codex native sub-agents still kill the parent turn under ChatGPT sharing (0.1.10 nightly), and T3's orchestration prompt tells Codex to use them #37386.
  2. Make the thread recoverable. When a turn fails with subscription_sharing_unsupported_capability, the poisoning agent_message items stay in the Codex history forever. T3 could offer a "continue in a fresh Codex thread" handoff, as it already does for cross-provider handoff. It could also tell the user that switching models within Codex will not help.
  3. Make the error say why. Currently it reads "Codex used a feature…". Naming the cause ("Codex started a sub-agent, which ChatGPT sharing does not support; this thread can't continue on Codex") would save users from retrying.

Impact

Blocks work completely

Version or commit

T3 Code 0.1.10 (desktop), Codex CLI 0.170.0

Environment

Windows 11, local server, Codex via Connect with ChatGPT (subscription sharing), gpt-6.2-astra (high), full-access runtime, top-level thread (not delegated)

Logs or stack traces

parent rollout (one top-level thread):
  turn_context            model gpt-6.2-astra, model_provider_id openai_token_sharing
  developer message       <multi_agent_mode>… Do not spawn sub-agents unless …</multi_agent_mode>
  function_call           collaboration.spawn_agent {"task_name":"log_analysis", "message": <encrypted>}
  event SubAgentActivity  started, agent_path /root/log_analysis
  response_item agent_message  author /root/log_analysis -> /root
                          "FINAL_ANSWER … Agent errored: subscription_sharing_unsupported_capability"
  task_complete           error.code subscription_sharing_unsupported_capability   (turn 1)
  task_complete           same error, 2 s after request_user_input_async answer       (turn 2)
  task_complete           same error after model switch to gpt-6.2-sol               (turn 3)

child rollout (forked_from parent): session_meta, turn_context, agent_message (NEW_TASK),
  then task_complete with the same error on its first request

Full rollouts are not attached because they contain private project material. I can share specific fields on request.

Workaround

Hand the thread off to another provider (Claude in this case). Starting a fresh Codex thread also works. Retrying or switching Codex models in the same thread does not.

Activity

  1. aviadr1 commented on Nov 19, 2026

    @aviadr1
    Author

    The launch-args fix for this is already open as #28143 (agents.enabled=false, with a test). I checked it on Windows and posted the results there. #28962 looks like the separate fix for recovering a session that has already been poisoned.

  2. vickylid commented on Nov 19, 2026

    @vickylid

    Confirming this also reproduces on 0.1.10 (macOS) directly from T3 Code's own orchestration prompt — without any skill or AGENTS.md asking for sub-agents:

    1. In a codex:shared (gpt-6.2-astra) thread, T3 Code's injected t3_code_orchestration_01 instructions tell the model:

      Subagents: use your native tool when the child uses your provider, a model it offers and no settings beyond yours (...; Codex spawn_agent, then wait).

    2. When asked to hand off the task to another Codex model (gpt-6.2-sol), the coordinator followed t3_code_orchestration_01 and emitted a native subAgentActivity / spawn_agent call, which failed with subscription_sharing_unsupported_capability.
    3. Just like described above, the rejected item remained in the Codex thread history, causing the next user turn to immediately fail with subscription_sharing_unsupported_capability as well, until T3 Code issued thread/reverted (rolled_back on both runs).

    So in addition to disabling agents.enabled under subscription sharing, t3_code_orchestration_01 should also avoid instructing Codex to use spawn_agent (and route same-provider handoffs through delegate_task instead).

  3. felix-thinkingdata commented on Nov 21, 2026

    @felix-thinkingdata

    I can reproduce this in a fresh conversation on T3 Code Desktop 0.1.12-nightly.20261121.5024, macOS 26.2 (Apple Silicon). The parent and child session records both show T3 Code as the originator, Codex CLI 0.171.0, and model provider openai_token_sharing.

    1. I sent test and got a normal reply. The successful turn also showed startup warnings for the optional computer-use and pinepaper MCP servers.
    2. In that chat, I attached a screenshot and asked the agent to look for an existing GitHub issue. It ran shell commands and spawned a native subagent for the duplicate check.
    3. The child received an agent_message and failed. The parent then received an agent_message and failed with the same error. The backend identified the rejected parameter as input without naming the individual item.

    Redacted sequence (UTC, 2026-11-21):

    05:58:04  parent  spawn_agent
    05:58:05  child   agent_message
    05:58:08  child   HTTP 400  subscription_sharing_unsupported_capability  param=input
    05:58:14  parent  agent_message
    05:58:16  parent  HTTP 400  subscription_sharing_unsupported_capability  param=input
    

    Opening that same conversation in the standalone Codex desktop UI also reproduces the symptom in #34303 on macOS. The child is labeled “completed” there, while T3 labels it failed. The desktop UI shows the underlying sharing error and a separate banner saying that openai_token_sharing is unavailable to continue the chat. The “completed” label is confusing given that both requests returned HTTP 400.

    Could T3 disable native subagent calls for managed sharing sessions until supported, or recover from the rejection so the parent can finish the task?

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions