Repository navigation
fix(codex): sharing usage limits offer the existing recovery options - #25341
Merged
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_exceededand the exact reported text:The raw-string case in
CodexManagedErrors.test.tssupplies that text without a Sharing code.CodexAdapterV2.test.tsalso 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.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
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
Native Codex emitted
turn/completed, statusfailed, withcodexErrorInfo: "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.tsxandUsageLimitRecoveryBanner.tsx; this diff has no OS-specific branch. Mobile's unchangedUsageLimitRecoveryCard.tsxandChatGptUsageLimitNotice.tsxconsume the same server failure, code and reset fields.The earlier ordinary Resume at reset / Cancel auto-resume interaction remains applicable because
UsageLimitRecoveryBanner.tsxhas 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
2d4ad359e548b9f9c1406aa40f4c9464547f8a9cmerges main57cd05904d3a5dc42bd6a6540d3d00f33db7f0c1and 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, stagesharing-merged-checks, default machine, workerbx_etq8eh37, attempt 1, succeeded with exit 0 on this head.vp i --frozen-lockfileandvp 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.Boat
j_lgsbtis5erndrpv37x7q, stagesharing-packaged-linux-evidence, default machine, workerbx_74ybpmyt, attempt 1, succeeded with exit 0 on this head. It ran a frozen-lockfile install andT3CODE_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 is2d4ad359e548b9f9c1406aa40f4c9464547f8a9c.The 190,047,282-byte AppImage has SHA-256
6ed8b61a2c9506cf8d32e84929c36250b02ea4b5eddfdc53bdb5f8e21478d2d8. That hash matched after transfer to physical corex. The captures above ran its extractedsquashfs-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.Base update verification, November 4
The integration run covers main
95e53a54dbd312fea7e8a2ef94514dc5f1c8ee3d. Its one overlapping change replacesEffect.succeed(undefined)with equivalentEffect.undefinedinCodexAdapterV2.ts's optional MCP-session lookup. Sharing classification, reset handling and recovery-card placement are unchanged.CodexManagedErrors.tsandUsageLimitRecoveryBanner.tsxhave 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 tree87895e1503174d6464eaa9058a530a2ddc53f8c8, using temporary local commit0104fccfedbd9f0784bff78a81e750dd82457842with the PR head and this base as parents. This commit was not pushed; the PR head remains2d4ad359e548b9f9c1406aa40f4c9464547f8a9c, preserving Maria's history.Boat
j_ygvk4jm3bbydilqsg37s, default machine, workerbx_2ycb73h8, attempt 1, succeeded with exit 0.vp i --frozen-lockfileandvp run check:changed 95e53a54dbd312fea7e8a2ef94514dc5f1c8ee3dpassed 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, withcodexErrorInfoset to eitherresponseStreamDisconnectedwith a null HTTP status orother. Both classify assubscription_sharing_usage_limit_exceededwithusageLimit: true. The classifier's blob is identical in the combined tree.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 addedSignatureservice 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 isa6a5dd98f26e9d95617c0f2afb32273527418624.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.