Skip to content

fix(codex): sharing usage limits offer the existing recovery options - #25341

Merged
shivamhwp merged 8 commits into
pingdotgg:mainfrom
shivamhwp:issue-watch/25333
Nov 5, 2026
Merged

shivamhwp merged 8 commits into
pingdotgg:mainfrom
shivamhwp:issue-watch/25333

Conversation

@shivamhwp

@shivamhwp shivamhwp commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Codex can report an exhausted ChatGPT Subscription Sharing allowance as a stream disconnect. T3 marks the thread Failed and omits usage-limit recovery. This recognizes the reported prose and personal/Business Sharing codes, marks the thread Limited, and shows one recovery card above the composer.

Sharing limits keep their own reset state. An ordinary Codex usage snapshot cannot invent a Sharing reset, so an unknown reset still requires a manual retry. Manage usage stays as a quiet secondary action because it opens allowance and credit settings. Business limits offer Copy request for admin. The duplicate floating banner and redundant settings description are removed. The scheduler and wire contract are unchanged.

Fixes #25333

Evidence

Unverified: live ChatGPT Subscription Sharing exhaustion and retry after its real reset on head 2d4ad359e548b9f9c1406aa40f4c9464547f8a9c. We have no Sharing account available. The new recordings use the reported error as an upstream HTTP fixture; they do not establish the live service's HTTP status, response shape or reset behavior.

Current-head runtime verification ran on physical corex in the packaged Linux Electron app 0.1.6, with its bundled T3 server and web client, native Codex CLI 0.166.0 and isolated app/provider homes. The 14-second personal recording shows provider Settings, the same prompt as the earlier main recording, Limited status, one composer recovery card and typing an editable retry draft. The 15-second Business recording shows prompt submission through Request copied. Both are direct 1440 by 900 screen recordings of the extracted AppImage, without a reload. The request goes through the bundled T3 server, installed Codex app-server, HTTP /v1/responses, native Codex error handling and T3's adapter. Only the HTTP endpoint is substituted. No database state, Codex protocol events or UI state were injected.

The personal fixture returns HTTP 400 with subscription_sharing_usage_limit_exceeded and the exact reported text:

stream disconnected before completion: The ChatGPT user has reached their Subscription Sharing usage limit. Ask the user to try again after their usage limit resets or use an API key instead.

The raw-string case in CodexManagedErrors.test.ts supplies that text without a Sharing code. CodexAdapterV2.test.ts also supplies it through retry notifications and terminal errors, and verifies that ordinary usage snapshots arriving before or after the failure cannot supply its reset time. Nearby cases retain ordinary quota recovery and reject incidental mentions of Sharing codes.

Before and after

Historical before on packaged main f2943ee90ef76b1db3fc1c1cd3808252418f5850, Electron 0.1.4 and native Codex 0.165.0. The HTTP fixture produced Failed, Provider error and a floating ChatGPT banner, without a composer recovery card. Main still lacks the raw-prose classification and the Sharing usage-limit flag.

Before on packaged main

main-native-electron.mp4

After on 2d4ad359e548b9f9c1406aa40f4c9464547f8a9c, recorded November 3. The sidebar becomes Limited, the timeline records Usage limit reached, and one compact ChatGPT recovery card appears above the composer with an unknown reset. The screenshot also shows an editable retry draft.

desktop-personal.mp4

Packaged Linux personal recording end frame

For Business, the same native Codex route receives subscription_sharing_workplace_individual_usage_limit_exceeded. Copy request for admin completes with Request copied.

desktop-business.mp4

Packaged Linux Business recording end frame

Native Codex emitted turn/completed, status failed, with codexErrorInfo: "other" for both HTTP fixtures. Its error message contained the fixture JSON and respective Sharing code. The client captures show T3 converting those generic native failures into usage-limit recovery.

The reporter used macOS Electron. Web and Linux/macOS Electron share the changed CodexManagedErrors.ts, CodexAdapterV2.ts, ChatView.tsx and UsageLimitRecoveryBanner.tsx; this diff has no OS-specific branch. Mobile's unchanged UsageLimitRecoveryCard.tsx and ChatGptUsageLimitNotice.tsx consume the same server failure, code and reset fields.

The earlier ordinary Resume at reset / Cancel auto-resume interaction remains applicable because UsageLimitRecoveryBanner.tsx has the same blob, aabe7734a3329e7d7e119d8d826b8a30228862ca, on e512ca0 and this head. This controlled-protocol-peer recording shows Resume changing to Cancel around 5:47 and cancellation restoring Resume around 5:49. It is interaction evidence, separate from the native Codex HTTP fixtures above.

runtime-raw.mp4

Nathan's historical live before/after supplies additional account context. His local checkout/build SHA is unknown, so those videos are not current-head proof.

Tests and integration

Head 2d4ad359e548b9f9c1406aa40f4c9464547f8a9c merges main 57cd05904d3a5dc42bd6a6540d3d00f33db7f0c1 and preserves Maria's commits. The only manual conflict combined main's Digest service with this PR's usage-limit test callback. A fresh independent Codex review found no regressions in classification, reset handling, callback positions or the single-card UI.

Boat j_awng643wf3ztnrzzxtwk, stage sharing-merged-checks, default machine, worker bx_etq8eh37, attempt 1, succeeded with exit 0 on this head. vp i --frozen-lockfile and vp run check:changed "$FLEET_SOURCE_BASE" passed format, lint, both knip phases, GraphQL generation, four affected package typechecks, 201 tests in eight files and three selected React Compiler cases.

Current-head check output and runtime details

Test Files  8 passed (8)
Tests       201 passed (201)
React Compiler selected cases: 3 passed, 1302 outside selection

check:changed summary
  pass  format
  pass  lint
  pass  knip 1/2
  pass  knip 2/2
  pass  graphql (apps/server)
  pass  typecheck (4 packages)
  pass  test (8 files)
  pass  react compiler (3 files)

Boat j_lgsbtis5erndrpv37x7q, stage sharing-packaged-linux-evidence, default machine, worker bx_74ybpmyt, attempt 1, succeeded with exit 0 on this head. It ran a frozen-lockfile install and T3CODE_WEB_SOURCEMAP=0 vp run dist:desktop:artifact --platform linux --target AppImage --arch x64 --output-dir out/build. The build log identifies Linux x64 version 0.1.6. Its pinned commit receipt is 2d4ad359e548b9f9c1406aa40f4c9464547f8a9c.

The 190,047,282-byte AppImage has SHA-256 6ed8b61a2c9506cf8d32e84929c36250b02ea4b5eddfdc53bdb5f8e21478d2d8. That hash matched after transfer to physical corex. The captures above ran its extracted squashfs-root/AppRun, with no replacement server, assets or development URL. Both MP4s passed full decoding, and their final frames above show the requested states. The earlier failed AppImage transfer is superseded by this successful job and runtime pass. Required GitHub checks pass after rerunning an unrelated file-save browser-test timeout.

Packaged build and corex executable receipt

Base update verification, November 4

The integration run covers main 95e53a54dbd312fea7e8a2ef94514dc5f1c8ee3d. Its one overlapping change replaces Effect.succeed(undefined) with equivalent Effect.undefined in CodexAdapterV2.ts's optional MCP-session lookup. Sharing classification, reset handling and recovery-card placement are unchanged. CodexManagedErrors.ts and UsageLimitRecoveryBanner.tsx have the same blobs as the recorded PR head, so the packaged recordings above remain applicable.

Main also changes dependency resolution and replaces the typechecker with effect-tsgo tsrs --noEmit. We checked the clean combined tree 87895e1503174d6464eaa9058a530a2ddc53f8c8, using temporary local commit 0104fccfedbd9f0784bff78a81e750dd82457842 with the PR head and this base as parents. This commit was not pushed; the PR head remains 2d4ad359e548b9f9c1406aa40f4c9464547f8a9c, preserving Maria's history.

Boat j_ygvk4jm3bbydilqsg37s, default machine, worker bx_2ycb73h8, attempt 1, succeeded with exit 0. vp i --frozen-lockfile and vp run check:changed 95e53a54dbd312fea7e8a2ef94514dc5f1c8ee3d passed all phases, including the four affected package typechecks under the new checker, 208 tests in eight files and 3 selected React Compiler cases.

A further direct check on this head supplied the exact reported prose only in additionalDetails, with codexErrorInfo set to either responseStreamDisconnected with a null HTTP status or other. Both classify as subscription_sharing_usage_limit_exceeded with usageLimit: true. The classifier's blob is identical in the combined tree.

Integration check output against base 95e53a5

The final ready check used main a07be97ab0753b2b5b0caecebba69d7f872594fa. Its later authentication and relay refactors do not change any PR production or test file. A separate read-only review confirmed that the native Codex error protocol, managed runtime files and Sharing classification/reset/UI paths are unchanged. The added Signature service is supplied by the existing platform crypto layer. The integration results and exact-head recordings above remain applicable. The clean merge tree against this final base is a6a5dd98f26e9d95617c0f2afb32273527418624.

Implemented by Opus 5.5 through Claude Code, with the reset correction by maria-rcks. Investigated, integrated, tested and independently reviewed by gpt-6.1-sol through Codex.

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

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Codex "Subscription Sharing usage limit" stream error isn't treated as a usage limit, so there's no resume-at-reset option

3 participants