Skip to content

[Design] Minimum safe Desktop composer compatibility across client updates #7587

Open

Description

@luvs01

[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:

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:

  1. May strict package identity and fail-closed payload validation replace exact-version admission? Define invalidation of any cached, completed package proof.
  2. Which consumer/cache evidence establishes the first supported surface? Leave unproved paths unclaimed.
  3. Approve or reject the WS dependency/host expansion, library and transport bounds. Define broker refresh: closing a shared socket also affects unrelated topics.
  4. 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

  1. added
    enhancement
    streaming
    on Oct 23, 2026
  2. Ingwannu commented on Oct 23, 2026

    @Ingwannu
    Owner

    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.

  3. luvs01 commented on Oct 23, 2026

    @luvs01
    CollaboratorAuthor

    A is now merged as bef4f50e281e5b3e240218c83fc4afc8cb8f8751. For B, the smallest proposed backend contract is:

    • Validate the existing official package family/publisher, canonical package name and manifest App/executable entry. Version remains part of the observed identity, rather than an admission allowlist. No new publisher, executable path or transport is admitted.
    • Coalesce pending probes only. A completed success is diagnostic history; the next independent check performs a fresh query and cannot fall back to that success after failure or cancellation.
    • Bind an active trial to the observed package identity. A changed identity or unverifiable check revokes its generation before corrected output. A newly verified package still needs fresh observation and explicit short-trial consent. Identical registration metadata cannot reveal every same-version reinstall; this does not claim continuous file/process attestation.
    • Preserve A's stale-generation handling, existing GET/SSE schema and protected-state checks, and the current short trial. No dependency, host, certificate, consent-duration or UI expansion is included.

    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.

  4. lidge-jun commented on Oct 28, 2026

    @lidge-jun
    Owner

    #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.

  5. lidge-jun commented on Oct 28, 2026

    @lidge-jun
    Owner

    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.0 remains 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.

  6. luvs01 commented on Oct 29, 2026

    @luvs01
    CollaboratorAuthor

    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

    Surface Source-confirmed behavior Native consumer evidence
    GET usage / GET SSE Wrapper selects only GET/200 and the two exact WHAM paths; SSE selects usage.snapshot. Does not prove the affected app receives or caches the result.
    POST /wham/usage/subscriptions Current wrapper and controller decline correction. #7368's flat snapshot/renewal tests remain prototype evidence.
    Broker events Upgrade handler pipes sockets without frame/topic decoding. No current broker correction or proven consumer contract.
    macOS app-server RPC Outer selector handles account/rateLimits/updated and top-level rate-limit results. Effective only when that channel actually feeds the gate. Snake-case support inside the helper does not broaden its outer selector/transport.

    Windows runtime still admits exact version 26.924.2738.0. appCacheConfirmed, sourceProcessVerified and composerRecoveryVerified remain 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:

    • 26.928.21956 / locally ported OpenCodex 2.73.0: Group A had the shim disabled, verified bundled-or-dev launch and Chromium connections to interception, with usable Send. The RPC quota fields were all null except limitId. Maintainer interpretation explicitly superseded the earlier no-connection result for that topology. No actual model request was sent in Group A; its initial percent wording was subsequently restated in the reporter follow-up. This is bounded UI/transport evidence, not present-dev acceptance.
    • 26.930.21537 / OpenCodex 2.76.0: inverse observation had the shim attached and self-tested, interception absent, 5h usage 100% / weekly 16%, and Send still disabled. The builds differ, so this is not a same-build factorial test.
    • 26.1007.30912 / OpenCodex 2.84.0: independent breakpoint report links the local-host submit-disabled term to a derived atom consuming snake-case WHAM state through a native bridge, with zero eligible RPC messages. Its reported successful local-provider turn followed a renderer intervention; that establishes reporter-observed consumer causality, not delivery through the present HTTP/RPC code.
    • 26.1013.40934 / OpenCodex 2.88.0: newer report traces the renderer usage snapshot through Electron main-process fetching against 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

    1. Select the first OS/build + actual cache consumer + transport, with separate package, cache/gate transition and submitted-turn receipts. Retaining GET/SSE and the short trial while collecting that evidence remains consistent with the latest maintainer recommendation.
    2. Decide B explicitly: retain exact-version admission, or permit observed versions under the existing fresh package/file-proof and invalidation rules. fix(desktop): bind usage trials to fresh package proof #7709 resolves proof invalidation, not native consumer compatibility.
    3. D-HTTP can be independent of C/E, but first needs the POST snapshot's native cache reader, generation/renewal ordering and overwrite behavior. feat(desktop): support usage push and version-independent compatibility #7368's producer fixture is insufficient.
    4. C/D-push needs observed broker host/topic, retained-state and catchup semantics, plus dependency/host/transport approval. Specify whether refresh may close a shared socket carrying unrelated topics. Do not infer that ws.chatgpt.com is universally required, or that missing protection fields in a partial push authorize correction.
    5. E still requires an account-wide lifetime/revocation decision despite unavailable per-conversation provider proof, plus old-server capability negotiation. Preserve the three-minute limit meanwhile.

    #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.

  7. luvs01 commented on Nov 3, 2026

    @luvs01
    CollaboratorAuthor

    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."

  8. github-actions commented on Nov 3, 2026

    @github-actions
    Contributor

    Automated translation bookkeeping — detected language: English.

  9. luvs01 commented on Nov 3, 2026

    @luvs01
    CollaboratorAuthor

    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; assessedVersion remains the baseline holding native acceptance evidence and is reported separately from admission. Per-build consumer coverage stays a separate receipt — observedVersion !== assessedVersion remains 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.

  10. lidge-jun commented on Nov 16, 2026

    @lidge-jun
    Owner

    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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementstreaming

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions