fix(server): ChatGPT sharing input-item rejections get their specific message #36207
main fromrefs/pull/36207/head·opened View on GitHubProblem#
When ChatGPT sharing rejects an input item, T3 shows the vague "Codex used a feature that ChatGPT sharing does not support" instead of its own more specific "Codex sent an input item…" message. I hit this on 0.1.10-nightly (macOS) after Codex subagents ran under Connect with ChatGPT. The raw rejection in the provider log was:
{"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.", "type": "invalid_request_error", "param": "input", "code": "subscription_sharing_unsupported_capability"}
classifyCodexManagedError picks the input-item message only when the text contains additional_tools. ChatGPT's real wording never contains that string: it lists "additional tools" as supported and ends with "Remove unsupported input items", so the specific branch never fires.
Change#
Match input item instead of additional_tools. The existing input item 'additional_tools' is not supported fixture still matches, and the tool 'namespace' branch still runs first.
Scope#
A small fix for an obvious bug in one function, so no issue. It is independent of #28143: that PR stops one source of these rejections (native subagents), while this one makes any input-item rejection report what it is.
Verification#
- Added ChatGPT's real rejection text as a row in the existing
distinguishes unsupported tools from input itemstable. Onmainit fails withexpected 'Codex used a feature that ChatGPT sha…' to include 'input item'; with the fix the file passes 6/6. - Runtime transcript: the classifier was given the exact
payload.errorshapeCodexAdapterV2receives (the response as a JSON string inmessage,codexErrorInfo: "other"):main code=subscription_sharing_unsupported_capability usageLimit=false message=Codex used a feature that ChatGPT sharing does not support. Use another provider for this request. fix code=subscription_sharing_unsupported_capability usageLimit=false message=Codex sent an input item that ChatGPT sharing does not support. Use another provider for this request. vp run check:changedpasses: format, lint, both knip passes, typecheck (41 packages) and the selected tests. This ran on Node 22.23.3, not the pinned 26.12.1.- Not checked: the message shown in a client. Nothing in the UI changed; clients show the same
failure.messagefield.
Created with Claude Opus 5.5 in Claude Code, running inside T3 Code.
- 1
tanstack-source added labelsbug
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XS
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
Approvability#
Verdict: Approved at
b112326Macroscope's review found this PR approvable — ChatGPT sharing input-item rejections now select the existing, specific error message using the provider’s actual wording. Error codes and handling remain unchanged, limiting the impact to clearer failure messaging.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).Hit this on T3 Code Desktop 0.1.13 (macOS) on 2026-11-29. A Codex thread on Connect with ChatGPT failed after 3s with the generic "Codex used a feature that ChatGPT sharing does not support. Use another provider for this request." Every retry in that thread failed the same way. Nothing in the message points to the real cause (the sub-agent rejection in #39101), so the user can't tell what to change.
Current
main(be0e8a5f16) still matches onlyadditional_toolsatapps/server/src/provider/CodexManagedErrors.ts:112, so this one-line fix still applies cleanly. It would be good to get it merged. It doesn't fix the cause, but it makes the failure say what it is while #39101 stays open.
Sign in to join this conversation.
No actionable comments were generated in the recent review.
Walkthrough
The unsupported-capability classifier now matches “input item” in the provider’s error text. A test covers the full message and checks the resulting managed-error message.
Changes: Unsupported input classification
apps/server/src/provider/CodexManagedErrors.ts,apps/server/src/provider/CodexManagedErrors.test.tsEstimated code review effort: 2 (Simple) | ~5 minutes
Change: Bug fix
Suggested reviewers:
shivamhwpMerge Risk:
Minimal · up to
b1123This change makes ChatGPT sharing rejections of unsupported input items show their specific message. No merge-blocking risk was found.
Pre-merge checks:
4
Full details: Title check
Explanation
The title names the main change: the ChatGPT sharing input-item rejection now gets its specific message. It matches the raw summary, which says the classifier now selects the input-item message when the text contains "input item". The title is 77 characters, slightly long, but it is clear and specific.
Full details: Description check
Explanation
The description follows the template. It has Problem, Change, Scope, and Verification sections. The problem includes expected behavior, the raw rejection text, and the environment (0.1.10-nightly, macOS). The change explains the match-string fix. Scope says it is a small bug fix with no issue and states it is independent of
#28143. Verification gives a failing-then-passing test result, a runtime transcript, and the check run. It also states what was not checked. The description does not link an issue, but the template allows a reason for no issue on a small obvious fix, and the author gave one. The model and harness line is present.Finishing Touches
Generate unit tests (beta)
34d57fd3-1ea4-476f-ba72-2de7b580cbefReviewing files that changed from the base of the PR and between f313d0a6cb843551fb60e57a454a71e71a3a8c04 and b1123261a9901b087cc2fa4b99f58c024b36eded.
apps/server/src/provider/CodexManagedErrors.test.tsapps/server/src/provider/CodexManagedErrors.tsIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.