Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(codex): prevent unsupported agent history in ChatGPT sharing #17499

Mergedconnwalk(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/17499/headmerged by maria-rcks View on GitHub

Problem

Managed Codex conversations using ChatGPT subscription sharing fail with subscription_sharing_unsupported_capability after native agent activity adds unsupported input items. Retrying a conversation containing those items repeats the rejection. The error's supported-input allow-list excludes native agent_message items.

Change

Override features.multi_agent=false and features.multi_agent_v2=false in managed Codex launch arguments. These overrides stay within the ChatGPT-sharing runtime; native/API-key provider launches are unchanged. T3-owned delegation tools remain available.

Scope and approval

This is a narrowly scoped compatibility fix for the existing managed ChatGPT-sharing provider. It prevents that runtime from generating history its configured endpoint rejects. No maintainer approval is claimed. The intentional restriction of native Codex agents is explicit for review; it does not introduce a new workflow or setting.

The final diff changes only runtime arguments and their tests. Error-classifier changes were removed after packaged-output inspection confirmed the helper currently has no production callers.

Verification

  • On upstream main ec80933ac8, vp test run apps/server/src/provider/CodexManagedRuntime.test.ts apps/server/src/provider/CodexManagedErrors.test.ts: eight tests passed using a local integration worktree with the same final runtime patch.
  • Runtime tests assert both launch overrides across managed account/executable cases.
  • An isolated Codex 0.156.1 feature-list check with both features enabled in test configuration confirms the launch overrides report both disabled.
  • git diff --check and targeted vp lint --type-aware passed for the changed runtime and test files.
  • vp run build:desktop and macOS arm64 directory packaging succeeded with both independent provider fixes. Packaged server chunks contain both feature overrides. The packaged CLI starts and prints its version in an isolated home.
  • A live managed-provider request has not been verified. The unsigned local bundle has not replaced the running signed installation.
  • Existing contaminated provider history is not rewritten; affected conversations require fresh provider context.

Agent: gpt-6.1-sol, Codex harness in T3 Code.

Fixes #17679

    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    2. Approvability

      Verdict: Not approved

      Macroscope's review found this PR not approvable — The managed ChatGPT-sharing runtime now defaults both native multi-agent features to disabled, changing behavior for every managed session rather than adding an opt-in path. The targeted error guidance is low risk, but the product-default change warrants human review.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    3. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      Review in Change Stack →

      No actionable comments were generated in the recent review. 🎉

      ℹ️ Recent review info
      ⚙️ Run configuration
      • Configuration used: Path: .coderabbit.config.ts
      • Review profile: CHILL
      • Plan: Advanced
      • Run ID: 0bc2bd23-4d4e-4cd9-990f-e423c4d8f54c

      📥 Commits

      Reviewing files that changed from the base of the PR and between ec80933ac8cd02fec5c97b342462ccc9567cdb1e and 87224d8e2544d5235cd0576da797a5680728c3e5.


      📒 Files selected for processing (4)
      • apps/server/src/provider/CodexManagedErrors.test.ts
      • apps/server/src/provider/CodexManagedErrors.ts
      • apps/server/src/provider/CodexManagedRuntime.test.ts
      • apps/server/src/provider/CodexManagedRuntime.ts

      Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.



      📝 Walkthrough

      Walkthrough

      The changes add a targeted error message for unsupported conversation input and set two multi-agent feature flags to false in managed Codex launch arguments.

      Changes

      Unsupported input error

      Layer / File(s)Summary
      Classify unsupported conversation input
      apps/server/src/provider/CodexManagedErrors.ts, apps/server/src/provider/CodexManagedErrors.test.ts
      The classifier returns guidance to start a new thread for the specified subscription-sharing error. Tests cover object and JSON-string responses, sensitive text omission, and credential revocation behavior.

      Codex runtime flags

      Layer / File(s)Summary
      Disable multi-agent features
      apps/server/src/provider/CodexManagedRuntime.ts, apps/server/src/provider/CodexManagedRuntime.test.ts
      Managed Codex launch arguments set features.multi_agent and features.multi_agent_v2 to false. Tests assert both values.

      Priority: ➖ Normal

      Estimated code review effort: 2 (Simple) | ~10 minutes

      Change: Bug fix

      Suggested reviewers: juliusmarminge


      Merge Risk

      Merge Risk: ⚪ Minimal · up to d3b6b

      No actionable merge-blocking risk is established by the supplied review evidence; the identified wording change would only make the error guidance less specific.

      Security Architecture Review

      Security architecture risk: ⚪ Minimal · up to 87224

      The change restricts native multi-agent capabilities within managed ChatGPT-sharing launches without adding permissions or changing credential handling. The new error-classification branch returns fixed guidance and does not modify conversations or credentials. No introduced or worsened security concern was identified.

      Retained concerns No architecture-level concerns identified.

      Security review details

      Security Blast Radius

      • inferred — The changed launch policy is scoped to managed Codex instances using ChatGPT sharing. The traced native launch branch does not consume these overrides. The PR adds no authority-bearing tool registration, credential destination, or cross-service dependency in the inspected change.

      Trust Boundaries and Controls

      • observed — Untrusted error text selects among fixed classifier responses; the new branch does not copy raw response content into its message or change credential authority. Tests assert sensitive-text exclusion and revoke:false for both object and serialized-string inputs.

      Resilience and Maintainability Implications

      • observed — The new classification branch performs no session, history, credential, or cleanup mutation. Repeated calls therefore introduce no new partial state transition or shared-state concurrency requirement; fresh-thread wording is guidance, not an implemented recovery operation.



      Pre-merge checks | Passed 3 | Failed 1

      ❌ Failed checks (1 warning)

      Check nameStatusExplanationResolution
      Description checkWarningThe description includes all required sections and provides clear problem, scope, approval rationale, and verification details. However, it materially conflicts with the changeset by stating that erro…Update the description to accurately document the CodexManagedErrors.ts and CodexManagedErrors.test.ts changes, or remove those changes from the pull request if they are not intended.
      ✅ Passed checks (3 passed)
      Check nameStatusExplanation
      Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
      Title checkPassedThe title clearly identifies the Codex compatibility fix for unsupported agent history in ChatGPT subscription sharing.

      Full details: Description check

      Explanation

      The description includes all required sections and provides clear problem, scope, approval rationale, and verification details. However, it materially conflicts with the changeset by stating that error-classifier changes were removed and that only runtime arguments and tests changed, while the raw summary shows changes to CodexManagedErrors.ts and its test.



      • Fix all pre-merge checks with AI
      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create a new PR


      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

      Comment `@coderabbitai help` to get the list of available commands.
    4. Adding observations from our affected T3 conversation, in support of #17679 and this fix:

      • We see subscription_sharing_unsupported_capability (type: invalid_request_error, param: input) with the same supported-input allow-list and “Remove unsupported input items or use an API key instead” message.
      • So far, the user observes the failures only with their two configured accounts/providers named codex1 and codex2. We have not independently compared their authentication routes/configuration with the working provider, so this does not isolate an account-specific cause.
      • In this conversation, a retry of a minimal text-only subagent smoke test ended with that rejection. No image-generation request was needed for this attempt. The retained history does not include a successful child result or enough native tool detail to identify the precise rejected input item.
      • A plain follow-up asking whether the session could recover also received the same rejection. A later turn did respond after a context handoff, but another subagent-test attempt failed again. Therefore, recovery of the visible T3 conversation should not be taken as proof that the original provider session/history was repaired.

      The practical impact is more than a failed child task: ordinary follow-up messages can fail too. These observations support preventing unsupported native-agent activity before it enters managed-provider history, and making the fresh-context recovery requirement clear to users.

      We have not tested this PR's patch or verified T3-owned delegation as a workaround, so this is a reproduction report, not confirmation that the fix works. The exact offending Responses input item remains unconfirmed from our available evidence.

      Posted with the user's authorization by Codex in T3 Code, based on the conversation's retained error records and user reports.

    5. maria-rcks merged this0eef5d0

    6. maria-rcks closed this

Sign in to join this conversation.