Skip to content
Source
Sign inSign up
pingdotgg/t3code

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

Openaviadr1(GitHub profile, opens in a new tab) opened this issue 14 comments

Before submitting

  • I searched existing issues. This is the same root cause as #37386 (closed as not reproduced), #29992, #31852, #17708 and #17679. It still reproduces on 0.1.10 stable, in a top-level thread, with no delegate_task. Current main still lacks the fix the maintainer identified on #37386.
  • I included enough detail to reproduce or investigate the problem.

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 #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.

  1. tanstack-source added labelsbug

  2. 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.

  3. 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).

  4. 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?

  5. EASYGOING45(GitHub profile, opens in a new tab)commented

    We hit this too. We reproduced it on macOS with T3 Code Desktop 0.1.12-nightly.20261123.5124, Codex CLI 0.171.0, and Connect with ChatGPT (openai_token_sharing).

    In a fresh top-level thread, the Astra parent made five successful model requests. T3's delegate_task also started a worker on another provider. Codex then used native collaboration.spawn_agent twice. Both Codex children received HTTP 400 on their first model request. The parent recorded an agent_message from the first child, and its next request also returned subscription_sharing_unsupported_capability for param=input. The worker started through T3 kept running. In an earlier affected thread, two subsequent turns returned the same error.

    I also checked the proposed change in #39102 with the actual 0.171.0 CLI. I used an empty Codex home for each run, a loopback endpoint serving the CLI's bundled catalog, and the same synthetic prompt. The catalog entry for gpt-6.2-astra declares multi_agent_version: "v2". I inspected the tool definitions in the first outgoing Responses request.

    Managed launch configurationNative collaboration tools offered
    features.multi_agent=false and features.multi_agent_v2=falseAll six, including spawn_agent and wait_agent
    Same configuration plus agents.enabled=falseNone

    The HTTP 400s above came from the live sharing service. The separate loopback test verifies prevention at tool discovery. Recovery of an already affected thread still needs separate coverage.

  6. Also reproduces on Windows 11, T3 Code 0.1.11, Connect with ChatGPT, gpt-6.2-astra (ultra effort). It was a fresh top-level thread. No skill asked for sub-agents, and there was no delegate_task. Only T3's orchestration instructions and a general AGENTS.md rule allowing sub-agents for searches were present.

    • Four model requests succeeded, with shell calls only. About 35 s in, Codex started a native sub-agent (inter_agent_communication).
    • The child request and the parent's next request both failed with subscription_sharing_unsupported_capability. Parent request ID: req_888d795c8082499c88058f8435e507c8.
    • The next user message also failed within ~2 s (req_bc6dda6b556d4991a63a64f1264fd846). The thread was permanently broken, as described above.

    +1 for #28143, with #28962 for recovery.

  7. Same bug here on T3 Code 0.1.11, macOS 27.2.1, Codex CLI 0.172.0, gpt-6.2-sol (high), Connect with ChatGPT (openai_token_sharing).

    • In a thread started on the managed instance, Codex called collaboration.spawn_agent. The child request failed with subscription_sharing_unsupported_capability (req_5375397725e04b579a65b8ca45cc73c3), and the parent failed six seconds later (req_b9c5e02273c44ec1a6dcf310b0a497bc).
    • After updating to 0.1.12, the next message in that same thread failed with the same error (req_fca2a7b937684a2bafd33636596b9ecb). I have not retried a fresh thread on 0.1.12, but that build's managed launch args still have no agents.enabled=false.

    +1 for #39102. I have not tested that branch, but I'm happy to confirm the result once it ships in a release.

    Logs analysed with Claude Code (Opus 5.5).

  8. Same bug here with v0.1.11 in Debian 13. I received an error saying "Codex used a feature that ChatGPT sharing does not support. Use another provider for this request.".

  9. This message is generated by Isak, Jöran Omark's AI buddy.

    Same bug on Windows 11, T3 Code 0.1.11, Codex CLI 0.166.0, gpt-6.2-astra (xhigh), Connect with ChatGPT (openai_token_sharing). That adds an older CLI to the list: the reports above are on 0.169 to 0.172.

    The trigger was T3's own orchestration prompt, as in the second comment. A top-level thread needed one fresh child per provider for the same check. It started the Claude and Gemini children with delegate_task, and both worked. For the Codex child it followed t3_code_orchestration_01 ("use your native tool when the child uses your provider … Codex spawn_agent, then wait") and called collaboration.spawn_agent. No skill or AGENTS.md asked for native sub-agents.

    Sequence (UTC, 2026-11-25), from the provider event log and both rollouts:

    21:27:23  parent  function_call collaboration.spawn_agent
    21:27:27  parent  next request accepted, reasoning streams normally
    21:27:32  child   agent_message NEW_TASK
    21:27:35  child   subscription_sharing_unsupported_capability  param=input
    21:27:37  parent  agent_message FINAL_ANSWER ("Agent errored: …") recorded;
                      its next request fails with the same error
    21:28:02  parent  new turn (a delegate_task result arriving) fails in under a second

    One detail that may help: the parent's request that carried the spawn_agent call and its output was accepted. Only requests carrying an agent_message item were rejected, first in the child and then in the parent. The thread stayed broken afterwards, as described above.

    Until a fix ships, our global Codex AGENTS.md tells GPT never to call spawn_agent in T3 Code and to start same-provider children with delegate_task as well.

    +1 for #39102, and for #28962 to recover threads that are already affected.

  10. FloatingComet62(GitHub profile, opens in a new tab)commented

    Same issue occuring when asking GPT 6.2 Sol High on a ChatGPT Plus subscription

    To spawn a subagent for a task

    After the first error, doing anything with the thread is basically useless as the thread is stuck in this loop

    image

    System Details: Debian 13 (trixie) Kernel 7.2.12 using the Stable App Image directly with unrelated telemetry disabling environment variables

    Update: editing the conversation before the error seemed to make the thread usable again

  11. Same here on a headless Linux server: T3 Code 0.1.11 (t3 serve, Ubuntu LXC), Codex CLI 0.172.0, Connect with ChatGPT on a personal ChatGPT Plus plan (openai_token_sharing), with both gpt-6.1-sol and gpt-6.2-sol (low/medium effort).

    • Every failed session in ~/.codex/sessions on this host contains collaboration.spawn_agent calls (2 to 13 per session) shortly before the failure. Short sessions that never spawn work fine: a 5-tool-call probe on gpt-6.2-sol succeeded.
    • Long top-level coordinator threads fail after 20 to 30 minutes, first with subscription_sharing_unsupported_capability and then, on every retry in the same thread, with a bare 400 Bad Request. A fresh thread works until it spawns again.
    • The spawns came from T3's orchestration prompt plus an AGENTS.md that recommended native sub-agents for parallel work. Nothing asked for delegate_task.

    +1 for #28143 (agents.enabled=false under subscription sharing) and #28962 (recovering a poisoned thread).

  12. One more data point that may matter for #28143: on 0.1.11 the managed Codex is already launched with the flags turned off, yet the tool is still offered.

    • ps shows: codex app-server -c thread_unload_delay_secs=0 -c model_provider="openai_token_sharing" … -c features.api_key_model_discovery=true -c features.multi_agent=false -c features.multi_agent_v2=false (Codex CLI 0.172.0).
    • ~/.codex/config.toml also has [features] multi_agent = false; codex features list reports multi_agent false, multi_agent_v2 false.
    • A fresh gpt-6.2-sol thread's rollout still lists spawn_agent, wait_agent, list_agents and interrupt_agent in its tools, and the system prompt still carries the multi_agent_role block. Asked to spawn, it did, and the turn failed with 400 Bad Request.

    So with Codex 0.172 the feature flags alone don't remove the sub-agent tools under subscription sharing; something else (the [agents] config, or T3's own orchestration prompt) still exposes them.

  13. Geek-Cheth(GitHub profile, opens in a new tab)commented

    Confirmed on Linux (Ubuntu 26.04.1), T3 Code t3 CLI 0.1.11, managed Codex 0.172.0, openai_token_sharing ("Connect with ChatGPT"), gpt-6.2-sol, 2026-11-27 (UTC+5:30).

    What I see in ~/.codex/sessions and ~/.codex/logs_2.sqlite:

    • The main agent calls spawn_agent (the built-in Codex subagent tool, not T3's delegate_task) and starts two children, typecheck and cloudflare, on gpt-6-luna.
    • The children's first request is opened with an agent_message item from the parent. It is rejected with:
    {"error":{"code":"subscription_sharing_unsupported_capability","message":"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.","param":"input","type":"invalid_request_error"}}
    • The children's failure comes back to the parent as another agent_message, so the whole turn fails with the UI error "Codex used a feature that ChatGPT sharing does not support. Use another provider for this request."
    • The thread is then unusable: agent_message items stay in its history, so every later message hits the same error.

    The launch flags (features.multi_agent=false, features.multi_agent_v2=false) are set, but spawn_agent is still offered to the model. That matches what @Tobechukwu-Njoku reported above.

    Screenshot (cropped to the banner and the failed subagents; hostnames and IPs removed):

    image

    Workaround that works for me: start a new thread and tell the agent not to use spawn_agent, and to use T3's delegate_task for parallel work instead. The delegate_task children are separate threads and their messages are plain text, which sharing accepts.

  14. Still reproducing on T3 Code Desktop 0.1.13 on Windows, including a normal follow-up failing after the subagent attempt.

    Environment verified from the installed app and affected session logs:

    • T3 Code Desktop: 0.1.13
    • Codex CLI used by the affected session: 0.167.0
    • Model: gpt-6.2-sol, medium effort
    • Provider: openai_token_sharing / Connect with ChatGPT
    • Windows: 26H2, build 26300.9974, x64
    • Parent session: forkedFromId: null

    Minimal reproduction:

    1. Started a new conversation and asked whether it could use subagents. It replied successfully.
    2. Asked it to use a test subagent to count the files in the archive folder and return only the total.
    3. Codex called native collaboration.spawn_agent, creating /root/count.
    4. The child failed, followed by the parent turn.
    5. Sent “okay dont do the subagent then”. That turn also failed with the same error.

    The parent rollout records the child’s failure as an agent_message before the parent fails.

    Verified timeline from local logs, 27 November 2026 UTC (28 November just after midnight in Sydney):

    12:59:09 Initial ordinary response completed successfully. 13:00:01 Native subagent /root/count started. 13:00:04 Child failure recorded as agent_message in parent. 13:00:04 Parent turn failed: subscription_sharing_unsupported_capability param=input, type=invalid_request_error 13:07:34 Follow-up asking to proceed without the subagent failed with the same error.

    The UI displays: “Codex used a feature that ChatGPT sharing does not support. Use another provider for this request.”

    This confirms the issue persists on 0.1.13, and asking the agent to stop using subagents does not recover the affected conversation. Please address both preventing unsupported native subagent calls and recovering conversations after this failure.

    Screenshot below:

    image
  15. Another occurrence on T3 Code Desktop 0.1.13 (macOS), 2026-11-29. A Codex thread on Connect with ChatGPT failed after 3s on a short git task. It showed the generic "Codex used a feature that ChatGPT sharing does not support. Use another provider for this request." Re-sending in the same thread failed again with the same error, which matches the "one spawn poisons the thread" behaviour described here.

    Two things make this harder on users than it needs to be:

    • The UI message hides the cause. #36207 (open, mergeable, idle since 2026-11-13) fixes the classifier so input-item rejections get the specific message. Current main still matches only additional_tools at apps/server/src/provider/CodexManagedErrors.ts:112, which ChatGPT's real rejection text never contains.
    • #28143, the attempt to stop catalog agents under sharing, was auto-closed unmerged on 2026-11-28 after a conflict, so nothing on main addresses the cause right now.

    Workaround until then: use a Claude thread, or Codex signed in with its own CLI login instead of Connect with ChatGPT.

Sign in to join this conversation.