Skip to content

fix(codex): prevent catalog agents in ChatGPT sharing - #28143

Open
matteodante wants to merge 2 commits into
pingdotgg:mainfrom
matteodante:fix/managed-codex-catalog-agents
Open

matteodante wants to merge 2 commits into
pingdotgg:mainfrom
matteodante:fix/managed-codex-catalog-agents

Conversation

@matteodante

@matteodante matteodante commented Oct 31, 2026 •

Copy link
Copy Markdown

Problem

Managed Codex sessions using Connect with ChatGPT already disable features.multi_agent and features.multi_agent_v2. A model catalog entry with multi_agent_version: "v2" can still expose native agent tools, leading to subscription_sharing_unsupported_capability for input and repeated failures when continuing the affected conversation.

Change

Add agents.enabled=false to the managed runtime launch overrides, keeping both existing feature flags disabled. Codex uses this setting to select the disabled-agent override before falling back to the model catalog.

Assert the setting in the existing primary/additional-account and managed/local-executable test matrix. Build the existing home-path assertion with path.join so the additional-account cases also reach the agent assertions on Windows.

Scope and approval

This completes the managed-sharing restriction introduced by merged PR #17499. Related evidence: #17679 and the native-agent failures in #21061.

The established capability is ChatGPT subscription sharing through the managed openai_token_sharing runtime. Its launch configuration already disables native multi-agent features; agents.enabled closes the model-catalog fallback in that same configuration. The additional test correction is needed to exercise that restriction across the full existing matrix on Windows.

The implementation follows @pirut's closed, unmerged #20270. The maintainer takeover comment explicitly left human approval outstanding. No maintainer approval is claimed for this PR. Disabling catalog-provided native agents changes the runtime's effective capabilities, so Macroscope's requested human review remains pending.

Verification

  • Windows x64: vp test run apps/server/src/provider/CodexManagedRuntime.test.ts passes all four existing cases. Before the path correction, both additional-account cases failed at the POSIX-only path assertion; that assertion is also present in base commit 79f1fadfc602.
  • Regression check: temporarily removing only the production agent override makes all four cases fail specifically on the missing agents.enabled=false argument. Restoring it makes the suite pass.
  • With the repository's pinned Node 26.12.1, vp run check:changed 79f1fadfc6020b820d541ca4691d2feebb15dd1b passes formatting, lint, both knip checks, generated GraphQL verification, typechecking of three affected packages, and all five selected tests.
  • git diff --check passes.
  • The original implementation's isolated Codex 0.163.0 probe used a v2-agent model catalog and a mock HTTP endpoint: feature flags alone exposed six native agent tools, while adding agents.enabled=false exposed none. This follow-up changes only the test's path assertion; that CLI probe was not rerun.

Upstream Actions require maintainer approval before execution and are not counted as passing CI. A complete T3 conversation with a real account and other operating systems was not exercised. The change prevents new native-agent histories; existing affected conversations are not repaired. Separate unsupported-capability reports such as tool_search remain outside this fix.

Original runtime implementation: GPT-6 Astra through the Codex harness in T3 Code. Windows test correction and PR documentation: GPT-6 through Codex.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Oct 31, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs Human Approval

Macroscope's review found this PR requires human approval — The change disables catalog-provided native agents for managed ChatGPT-sharing sessions to prevent unsupported-capability failures. Human review is required to confirm this change to the runtime’s effective default capabilities.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 3e12acc and c9b0ece.

Files selected for processing: 1
  • apps/server/src/provider/CodexManagedRuntime.test.ts

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

Walkthrough

The managed Codex launch arguments now include agents.enabled=false. The tests check that argument and build the additional-account home-path suffix with Path.join.

Changes: Codex agent setting

Layer / File(s) Summary
Managed launch arguments and tests
apps/server/src/provider/CodexManagedRuntime.ts, apps/server/src/provider/CodexManagedRuntime.test.ts
managedCodexLaunchArgs adds agents.enabled=false. The tests check the launch argument and use Path.join for the expected additional-account home-path suffix.

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

Change: Bug fix

Suggested reviewers: juliusmarminge

Merge Risk: Minimal · up to c9b0e

No actionable merge risk was identified; the change is ready to merge.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title clearly and concisely describes the primary change: preventing catalog-provided agents in ChatGPT sharing.
Description check Passed The description includes the required Problem, Change, Scope and approval, and Verification sections. It explains the failure mode, implementation, test coverage, approval status, limitations, and obs…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description includes the required Problem, Change, Scope and approval, and Verification sections. It explains the failure mode, implementation, test coverage, approval status, limitations, and observed results. It also identifies that maintainer approval remains pending rather than claiming approval that was not received.

Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Build the overlay-home expectation with the injected Path service. A POSIX-only substring stopped both additional-account cases before the catalog-agent assertions on Windows. The existing four-case matrix now passes and catches a missing agents.enabled override in every case.
@juliusmarminge juliusmarminge added bugfix Fix PR opened by an issue lead; enters the PR loop pr:needs-julius Needs Julius: route gate, unverifiable surface, or blocked labels Nov 3, 2026
spk-ai added a commit to smartphonekey/t3code that referenced this pull request Nov 9, 2026
Backport the prevention fix from pingdotgg#28143. Set agents.enabled=false alongside the existing feature overrides so catalog metadata cannot re-enable native agents. Extend the existing account/executable test matrix and use a portable home-path assertion.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fix PR opened by an issue lead; enters the PR loop pr:needs-julius Needs Julius: route gate, unverifiable surface, or blocked size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants