Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): ChatGPT sharing no longer offers Codex native sub-agents #39102

Mergedjuliusmarmingemerged 4 commits intomain fromrefs/pull/39102/headmerged by Yash-Singh1(GitHub profile, opens in a new tab) View on GitHub

juliusmarmingecommented

With Connect with ChatGPT (subscription sharing), Codex on gpt-6.x models was still offered native sub-agent tools such as spawn_agent. The sharing backend rejects these, so a single spawn left the thread unusable. Managed Codex now also launches with agents.enabled=false, so these tools are never offered. Sharing sessions use T3’s delegate_task for subagents, including same-provider handoffs.

Addresses the prevention portion of #39101. Recovery for affected threads is tracked in #28962.

Reproduction on main

Commit 470ca63499 (origin/main). Ran the real Codex CLI 0.170.0 (the reporter's version) via codex exec --ignore-user-config -m gpt-6.2-astra with an empty CODEX_HOME and main's exact managed launch args from apps/server/src/provider/CodexManagedRuntime.ts (model_provider=openai_token_sharing, features.api_key_model_discovery=true, features.multi_agent=false, features.multi_agent_v2=false). The provider base_url and model_catalog_url pointed at a loopback mock that served Codex's own bundled catalog (codex debug models --bundled; every gpt-6.x model, gpt-6.2-astra included, has multi_agent_version "v2") and recorded /v1/responses bodies. With main's args, the first request's additional_tools offered spawn_agent, wait_agent, list_agents, followup_task and interrupt_agent, and a developer message carried Codex's own / instructions. The identical run with -c agents.enabled=false added offered none of them. Without a served catalog (404), neither config offered agent tools, which can hide the bug. Not observed: the sharing backend's subscription_sharing_unsupported_capability rejection and the thread staying broken afterwards, because that needs a real Connect with ChatGPT login, which no worker has. Failing test: one assertion that the launch args include agents.enabled=false, added to the existing case in apps/server/src/provider/CodexManagedRuntime.test.ts. vp test run src/provider/CodexManagedRuntime.test.ts fails 4/4 parameterised cases on that assertion only.

Evidence

@dotspace42 verified the fix through the T3 CLI with a real Connect with ChatGPT login, Codex 0.166.0, and gpt-6.2-astra. On the base commit, a native spawn caused the sharing rejection and the follow-up failed. On the PR commit, Codex offered no native subagent tools and answered the follow-up in the same conversation. Before and after results

Tests

  • vp test run src/provider/CodexManagedRuntime.test.ts (apps/server) without the fix: 4 failed of 4
  • vp test run src/provider/CodexManagedRuntime.test.ts (apps/server) with the fix: 4 passed of 4
  • vp run check:changed: format, lint, knip, graphql, typecheck (3 packages) and tests (2 files) all passed

Not in this change

  • Repairing threads already broken by an agent_message in their history (open PR #28962).
  • A clearer error for subscription_sharing_unsupported_capability rejections (open PR #36207).

Who did the work

  • Written by Claude Opus 5.5, in Claude Code
  • Reviewed by GPT-6.1 Sol, in Codex, and by Claude Opus 5.5, each on its own
  • Proof captured by GPT-6.1 Sol and checked by Claude Opus 5.5

Run by the t3code factory in T3 Code.

    1. Pushedfa01d26

    2. This was happening really frequently for me recently. Once Codex spawned a subagent, even a simple follow-up in the same chat would fail. I’ve updated to the nightly with the fix. Thanks for tracking this down and fixing it.

Sign in to join this conversation.