Repository navigation
Description
[Design] Minimum safe Desktop composer compatibility across client updates
Area
Multiple areas
What are you trying to accomplish?
Keep a signed-in Codex Desktop usable when the main account has exhausted its allowance but an independently authorized pool account or external provider can serve the selected route. Keep actual usage, credits, spending restrictions and server-side account/provider limits authoritative.
This is the design/security follow-up requested in #7368's closing comment, before adding a dependency or desktop UI. #7368 remains closed. The remaining composer symptom is already tracked in #6196.
What prevents this today?
At dev c51b0b4:
- Windows admission pins one historical package version. Package identity, supported payloads and composer acceptance are separate claims.
- HTTP correction covers GET JSON usage and GET SSE usage streams; upgraded sockets remain opaque. POST subscriptions and broker frames are outside that contract.
- Account-wide consent lasts three minutes. Routing preflight cannot prove a conversation's selected provider.
- The macOS RPC shim can be attached without seeing gate-bearing messages. Synthetic tests and attachment alone do not establish composer coverage ([Bug] Codex App (macOS): send button disabled at quota exhaustion - the #5947 intercept never sees the gate reads (they come from the bundled app-server) #6196).
Current status (2026-10-28): identity revocation #7582, fresh package-proof binding #7709, and paired GUI-session authority #7775 are merged. These are bounded completed slices. The maintainer's current disposition explicitly leaves version-independent admission, broker transport, usage consumers and session consent subject to their owner/security decisions. This issue remains open; those merges do not authorize the remaining expansion or establish live composer acceptance.
What should OpenCodex do?
Agree on the smallest consumer-facing contract and review the following units independently. Several can proceed in parallel.
| Unit | Scope and actual dependency |
|---|---|
| A. Identity revocation | #7582 is merged into dev as bef4f50e281e5b3e240218c83fc4afc8cb8f8751. Preserve its stale-generation protection in later work. |
| B. Version-independent admission | Retain official family/publisher, canonical basename and App-entry checks. A backend-only slice, independent of C/D/E. |
| C. Bounded broker transport | Review dependency choice, fixed-host verified TLS/proxy routing, ordering, binary/text kind, heartbeat, backpressure and cancellation. Keep unrelated upgrades opaque. |
| D. Usage consumers | D-HTTP would add POST subscription handling after proving its cache consumer, without C. D-push requires C and the snapshot/cache contract. Both can retain the existing trial. |
| E. Session consent | Backend lifetime/revocation and capability negotiation can use existing GET/SSE without C/D-push. New UI depends on that contract and the requested design/security review. |
Code dependencies are C -> D-push and E-backend -> E-UI. Newer-package activation additionally needs B's admission decision; authoring the other units need not wait. Shared controller edits need integration checks, not a five-PR serial chain.
Only paths shown to populate or update the affected composer's gate/cache should enter correction:
| Surface | Evidence and minimum treatment |
|---|---|
GET /backend-api/wham/usage and GET /backend-api/wham/usage/stream |
Existing JSON/SSE contract; confirm the affected client consumes it. |
POST /backend-api/wham/usage/subscriptions |
Closed #7368 prototype/tests only. Prove its cache consumer; preserve renewal/generation metadata and request bytes. No WS dependency. |
Broker /backend-api/pages/realtime-broker/u<digits>/ws |
Prototype topic codex-work-usage-push-v1, usage.snapshot and recovered subscribe catchups only. Native consumer/host proof remains required; fixtures do not establish a universal WS or ws.chatgpt.com requirement. |
App-server account/rateLimits/read result / account/rateLimits/updated notification |
Existing macOS projection; only useful where those messages feed the gate. |
Partial pushes require a proven merge/retained-state contract; omitted protection data is not authorization. Unrelated topics, unknown schemas, protected states and non-success responses retain original content. UI projections never become pool capacity or billing evidence.
Owner/security decisions requested:
- May strict package identity and fail-closed payload validation replace exact-version admission? Define invalidation of any cached, completed package proof.
- Which consumer/cache evidence establishes the first supported surface? Leave unproved paths unclaimed.
- Approve or reject the WS dependency/host expansion, library and transport bounds. Define broker refresh: closing a shared socket also affects unrelated topics.
- Accept or reject account-wide runtime-session consent without per-conversation isolation. Define withdrawal, identity/routing changes, recovery/re-exhaustion, stop/crash and certificate deadlines. Require capability negotiation with older servers.
Example usage or interface
Main account exhausted + valid selected alternate route -> Desktop can submit -> the ordinary proxy dispatch admits or refuses using that route's real credentials and limits. A request that actually needs the exhausted native account still gets its genuine refusal.
Unknown identity/schema, withdrawal or protected spending -> original state remains authoritative. Report response production, native cache update and composer submission separately.
Alternatives or workarounds
Use the existing RPC projection where it reaches the consumer, or retain the existing short trial for a narrowly supported HTTP surface. Authless mode is a different workflow because it changes the signed-in account presentation. Provider inference routing alone cannot repair a turn the client never submits.
Keep cost small: no per-version/response model calls or bundle analysis; cheap path/method/topic rejection; bounded snapshot decoding; coalesced package probes with explicit invalidation; current identity/routing checks before output.
Additional context
Current source: package admission, HTTP controller, usage policy, routing preflight, RPC consumer boundary.
The closed #7368 diff is a prototype reference, not current-dev behavior or native end-to-end proof. No new implementation, dependency, UI, live configuration or exhausted-account acceptance run is included in this design request.
Related: #5941 is closed, #6196 open, #4878 closed as duplicate. Closed #7100 concerns pool spending priority. #4869 is closed as not planned and proposes a different per-thread Reserve override. Keep symptom investigation in #6196 and identity revocation in #7582.
Acceptance needs a genuinely exhausted signed-in account, eligible alternate route, proven consumer/cache update and an actual submitted turn. Also verify genuine native refusals, protected limits, identity changes and disable/restart/crash cleanup. Synthetic tests and transport counters alone are insufficient.
Checks
- I searched existing issues and documentation.
- This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
- I removed secrets and personal data.
Activity
Ingwannu commentedon Oct 23, 2026
The decomposition is suitable for independent review, but it is not blanket approval to activate newer Desktop builds or new correction transports. The concrete next reviewable slice is A (#7582): revoke an existing trial after failed current identity verification, with generation-bound stale-result controls. B, C, D and E retain the owner/security decisions listed here; I am not authorizing a dependency, host expansion, certificate change, consent extension or new UI through this comment.
For every later slice, retain separate receipts for verified package identity, observed consumer/cache update, and an actual submitted native turn. A produced HTTP/SSE payload, attached RPC shim or passing synthetic fixture proves none of the other two by itself. Unknown schema/identity, protected spend/limits and withdrawal must retain the original authoritative state. Version-independent admission also needs explicit invalidation of a previously completed proof, rather than a permanent cached acceptance.
Keep the existing minimum supported surface and short-trial lifetime while those decisions/evidence are pending. The closed #7368 prototype is reference material; no live exhausted-account experiment or native client modification was performed here.
luvs01 commentedon Oct 23, 2026
A is now merged as
bef4f50e281e5b3e240218c83fc4afc8cb8f8751. For B, the smallest proposed backend contract is:Fixtures would cover fresh checks after completion/failure, pending coalescing, late-result rejection, observed identity changes and unchanged-identity limits. Package proof, actual consumer/cache updates and submitted native turns remain separate acceptance receipts.
Does this satisfy B's admission decision, or is additional bounded file-identity binding required first? This proposal does not enable newer builds or start a live trial.
lidge-jun commentedon Oct 28, 2026
#7775 is now on dev as abc932d. It requires a paired GUI-session authority (trusted loopback ingress, session/origin/CSRF revalidation) for the Desktop compatibility mutation routes and routes the dashboard's compatibility calls through the paired machine-plane session.
This does not complete the design here. The remaining units in the table above (version-independent admission, bounded broker transport, usage consumers, session consent backend/UI) keep their owner and security decisions, so this issue stays open.
lidge-jun commentedon Oct 28, 2026
Maintainer triage lane status/design proposal. Reviewed dev
fdc6dd82d930295880dcf6d10bbb9f2c61994574; no approval is implied. @luvs01 supplied the unit decomposition and package-proof proposal; @Ingwannu set the acceptance boundaries, and @lidge-jun’s latest disposition explicitly preserves the remaining owner/security decisions.Landed and remaining. A (#7582), package-proof binding (#7709), and paired GUI-session authority (#7775) are merged. The latter requires human paired-session authority at src/server/management/desktop-compatibility-authorization.ts:9. These completed slices should stay closed. Exact version
26.924.2738.0remains enforced at src/codex/desktop-compatibility/installed-build.ts:74; src/codex/desktop-compatibility/usage-controlled-fetch.ts:12 remains GET-only, upgraded sockets remain opaque, and the maximum trial remains three minutes. structure/clients/codex-desktop.md:181 separates response production from native cache/composer acceptance.Next decision. Options are retaining the present supported surface while collecting consumer evidence; selecting a bounded B admission change; or selecting D-HTTP subscription support once its native cache consumer is proven. I recommend the first until the owner selects the first supported consumer surface and decides whether package/schema checks may replace exact-version admission. #7709 supplies proof invalidation, not that admission decision.
No remaining compatibility-expansion implementation should start before that decision. C still needs dependency/host/transport approval; D-push depends on C; E needs account-wide lifetime/revocation and capability-negotiation decisions before UI work. #7368 remains a closed prototype. Preserve protected spending and unknown schemas, and require separate receipts for package identity, actual cache update and a submitted native turn. Synthetic payloads or attached shims do not establish composer recovery.
luvs01 commentedon Oct 29, 2026
Read-only consumer-path verification at dev
8eb970d9dcd63d119c9a9d20de4c18a27ca542c2, following the latest maintainer disposition. No compatibility expansion, native app change, live request, permission/host/dependency change or new acceptance run was performed.Current dev: producer capability remains separate from consumption
usage.snapshot./wham/usage/subscriptionsaccount/rateLimits/updatedand top-level rate-limit results.Windows runtime still admits exact version
26.924.2738.0.appCacheConfirmed,sourceProcessVerifiedandcomposerRecoveryVerifiedremain false in code, not merely in prose. A validated stream count, changed HTTP cache header or successful stream-close callback is not a native cache/composer receipt. Conversation-init restrictions remain untouched.#6196's later evidence changes the macOS diagnosis
The original ~20-hour no-intercept/Rust observation is valid for 26.924.22138, but does not describe every later build:
workspaceRouting.backendOrigin. Rewriting it to plain HTTP failed native HTTPS-origin validation. No alternate-origin rewrite is proposed here.For Windows, current source and #7368's reported 59 extracted-expression synthetic cases do not supply a current native source-process/cache/turn receipt. The reviewed record lacks the original extraction and immutable Desktop-build artifact needed to independently replay that client-side claim. This is a specific evidence gap, not a claim that no useful investigation exists.
Decisions needed before a new implementation slice
ws.chatgpt.comis universally required, or that missing protection fields in a partial push authorize correction.#7582, #7709 and #7775 remain completed slices. The added result here is the build-specific consumer/evidence distinction; it neither revives #7368 nor declares #6196 fixed.
luvs01 commentedon Nov 3, 2026
Windows acceptance evidence on Codex Desktop 26.1027.3384.0 / OpenCodex 2.96.0:
The user sent one marker from the original local composer with devin/swe-2 selected; the local turn completed with the exact requested answer. The only Devin request starting within that turn's time window returned 200 from swe-2. ChatGPT login remained active, and the same existing remote host/chat remained readable before and after.
Important limit: ordinaryUsageAllowed remained false and weekly usedPercent was 100, but hasCredits was true. This is a positive coexistence result for native composer + Devin + sign-in + remote read, not acceptance of correction with all allowances/credits exhausted. No compatibility start/apply/launch, trust, authless, routing or account-setting changes were made. Runtime management reads returned 401; no mode claim is made.
This supports keeping the currently working path unchanged. For B, please decide whether strict official-package proof plus verified consumer coverage may replace exact-version admission; native dispatch success alone must not be the admission proof. For E, please decide on account-wide runtime-session consent ending at package/identity/routing change, protection/recovery, shutdown/crash or certificate deadline, with legacy clients retaining the current 3-minute trial. Persisting consent across restarts would be a separate decision, not implied by "until update."
github-actions commentedon Nov 3, 2026
Automated translation bookkeeping — detected language: English.
luvs01 commentedon Nov 3, 2026
Draft #8114 implements the proposed B admission contract for review, pending the maintainer''s decision on whether it satisfies B: admission binds the completed official-package proof (family, publisher, manifest App entry, canonical executable) instead of the exact version. The observed version stays inside the hashed package identity, so an update still advances the binding revision and revokes a prior trial before another corrected response;
assessedVersionremains the baseline holding native acceptance evidence and is reported separately from admission. Per-build consumer coverage stays a separate receipt —observedVersion !== assessedVersionremains visible in status, and native dispatch success alone is not claimed as admission proof. Pending probes coalesce only; each check performs a fresh query and never falls back to a completed success. The 3-minute trial, consent, schema validation and GET/SSE surface are unchanged. If additional bounded file-identity binding is required for B, the draft names the exact seam where it would attach.lidge-jun commentedon Nov 16, 2026
Owner decision recorded (lidge-jun, PR backlog review 2026-11-14/15): option B is approved — admit proof-verified Codex package builds for compatibility correction instead of an exact-version allowlist; the version stays part of the hashed package identity so an update re-runs the trial. Implemented by #8114, which is in review.
feat(desktop): admit proof-verified Codex package builds for compatib…