Skip to content

Regenerate Codex reset credit protocol bindings#4173

Merged
juliusmarminge merged 1 commit into
mainfrom
codex/app-server-reset-credit-bindings
Jul 20, 2026
Merged

Regenerate Codex reset credit protocol bindings#4173
juliusmarminge merged 1 commit into
mainfrom
codex/app-server-reset-credit-bindings

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Jul 19, 2026

Copy link
Copy Markdown
Member

Summary

  • pin the Codex app-server protocol generator to the current upstream schema and regenerate the checked-in bindings
  • expose rateLimitResetCredits counts and optional credit details, including IDs and expiry timestamps
  • expose the account/rateLimitResetCredit/consume request and response mappings
  • add the upstream response-name overrides needed for deterministic generation
  • add focused protocol mapping tests for count-only snapshots, detailed credits, and reset consumption

Why

The previous pinned Codex schema predates the earned rate-limit reset surface, so clients could not represent banked reset credits or invoke the consume RPC through the generated protocol maps. Regenerating from the current upstream schema keeps the bindings source-derived instead of hand-maintained.

Impact

Consumers of effect-codex-app-server can now read earned reset-credit availability and details from account/rateLimits/read, select a credit when available, and decode responses from account/rateLimitResetCredit/consume.

Validation

  • vp test run packages/effect-codex-app-server/src/protocol.test.ts — 9 tests passed
  • vp run typecheck in packages/effect-codex-app-server
  • vp run typecheck in apps/server
  • vp fmt packages/effect-codex-app-server --check
  • vp lint packages/effect-codex-app-server
  • git diff --check

Note

Regenerate Codex protocol bindings to add rate-limit reset credit and new methods

  • Updates the upstream protocol ref to 678157acaa819d5510adfe359abb5d0392cfe461 in generate.ts and regenerates all derived binding files.
  • Adds client request methods account/rateLimitResetCredit/consume, app/read, app/installed, account/workspaceMessages/read, and externalAgentConfig/import/readHistories with typed params/response schemas.
  • Adds server notification methods thread/environment/connected, thread/environment/disconnected, rawResponse/completed, externalAgentConfig/import/progress, and model/safetyBuffering/updated.
  • Extends the generated schema with new types for rate-limit credit structures, Amazon Bedrock auth mode, external agent config migration, thread sleep items, and token usage breakdown fields.
  • Adds protocol tests covering account/rateLimitResetCredit/consume method registration and earned reset credit mapping in the rate-limits read response.

Macroscope summarized 81d31b8.


Note

Medium Risk
Large generated-protocol refresh touches account/rate-limit RPC typing used by clients; risk is mainly integration drift if upstream semantics differ, mitigated by focused protocol tests.

Overview
Bumps the Codex app-server upstream protocol ref and regenerates checked-in bindings so clients track the current OpenAI schema instead of the old pin.

The headline consumer change is earned rate-limit reset credits: account/rateLimits/read responses can include rateLimitResetCredits, and account/rateLimitResetCredit/consume is wired through the generated RPC maps with typed params/response. The generator also gains response-name overrides for account/workspaceMessages/read and externalAgentConfig/import/readHistories so those methods resolve to the correct schemas.

The regen pulls in additional upstream surface (e.g. app/read, app/installed, thread environment connect/disconnect notifications, external-agent import progress, model/safetyBuffering/updated, rawResponse/completed) as part of the same protocol bump. Protocol tests assert reset-credit decoding on rate-limit snapshots and consume request/response mapping.

Reviewed by Cursor Bugbot for commit 81d31b8. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-authored-by: codex <codex@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d3906cec-8f03-47bb-8caf-82a101157e5e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/app-server-reset-credit-bindings

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL 1,000+ changed lines (additions + deletions). labels Jul 19, 2026
@juliusmarminge
juliusmarminge marked this pull request as ready for review July 19, 2026 23:27
@macroscopeapp

macroscopeapp Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

Diff is too large for automated approval analysis. A human reviewer should evaluate this PR.

You can customize Macroscope's approvability policy. Learn more.

@juliusmarminge
juliusmarminge merged commit 08993a5 into main Jul 20, 2026
21 checks passed
@juliusmarminge
juliusmarminge deleted the codex/app-server-reset-credit-bindings branch July 20, 2026 09:14
adamfgr pushed a commit to agriffiths-bots/t3code that referenced this pull request Jul 21, 2026
* fix(server): resolve Claude SDK executable path on Windows npm installs (pingdotgg#3740)

* Fix project action preview settings persistence (pingdotgg#3842)

* fix(desktop): allow clipboard writes in the preview browser (pingdotgg#3889)

* fix(web): handle sidebar shortcut before editors (pingdotgg#3921)

* fix(server): recognize Bedrock-backed Claude as authenticated (pingdotgg#3931)

* Fix incorrect pluralization of “entry” (pingdotgg#3933)

* feat(server): title background-task work-log rows with the task name (pingdotgg#3751)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

* fix: delegate OpenCode session titles to provider (pingdotgg#3720)

* Archive selected threads from the context menu (pingdotgg#3895)

* fix(cli): support force removing projects (pingdotgg#3922)

* fix: allow sidebar to be shrunk when wider than viewport (pingdotgg#2456)

Co-authored-by: Shoaib Ansari <shoaibansari@Shoaibs-Mac-mini.local>
Co-authored-by: Julius Marminge <julius0216@outlook.com>

* fix(codex): show web search query and url in tool call details (pingdotgg#2093)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

* Add Codex launch arguments setting (pingdotgg#2892)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Julius Marminge <jmarminge@gmail.com>
Co-authored-by: root <root@localhost.localdomain>

* [orchestration] Clear stale active turn when session becomes inactive (pingdotgg#3159)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

* Regenerate Codex reset credit protocol bindings (pingdotgg#4173)

Co-authored-by: codex <codex@users.noreply.github.com>

* fix(preview): preserve direct localhost navigation (pingdotgg#3939)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: codex <codex@users.noreply.github.com>

* Synchronize mobile threads with authoritative shell snapshots (pingdotgg#4163)

Co-authored-by: codex <codex@users.noreply.github.com>

* Gate iOS glass layout on native support (pingdotgg#4032)

Co-authored-by: codex <codex@users.noreply.github.com>

* fix(opencode): resume the OpenCode session on follow-ups instead of starting an empty one (pingdotgg#3617)

Co-authored-by: codex <codex@users.noreply.github.com>

* fix(server): use CLI for OpenCode health check instead of spawning server (pingdotgg#4153)

* fix(web): scope timeline minimap hover target to the side gutter (pingdotgg#3869)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

* [codex] show complete approval details (pingdotgg#4111)

* fix(web): paint text selection over composer chips (pingdotgg#4139)

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>

* [codex] preserve custom model slugs (pingdotgg#4168)

* fix(web): preview workspace images in the file panel (pingdotgg#3996)

Co-authored-by: Rhiz3K <rhiz3k@protonmail.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>

* feat(web): drag files from the explorer into the chat composer (pingdotgg#4140)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>

* fix(desktop): preserve main window bounds (pingdotgg#3851)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: codex <codex@users.noreply.github.com>

* perf(orchestration): speed up new-chat propagation and offline catch-up (pingdotgg#4177)

Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>

* Finale: upgrade changed files card to fix various UI issues (pingdotgg#4113)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

* fix(web): always show environment chip for remote projects (pingdotgg#4217)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

* chore: reconcile upstream sync (20260721) — typecheck/test fixups

Post-cherry-pick reconciliation of the shell/thread sync rewrite:
- adopt upstream's client shell.ts + shell-sync.test.ts (drops the fork's
  superseded #142 replay-gap watchdog; server no longer emits 'caught-up')
- remove the orphaned 'caught-up' contract member and obsolete fork shell
  server tests (upstream's coalescing tests cover the behavior)
- keep the fork's thread reconciliation, resubscribing via subscribeDynamic
  (establish base once; foreground/session resubscribe via the live cursor)
- add latestSequence to OrchestrationEngine test mocks; thread dispatch
  authority in bin.test; narrow stream-item unions past the new 'synchronized'

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Co-authored-by: David Whatley <nsxdavid@gmail.com>
Co-authored-by: coach007 <6238600+keeperxy@users.noreply.github.com>
Co-authored-by: Carlos Rico-Ospina <carlosricojr@gmail.com>
Co-authored-by: Andrew Barnes <bortstheboat@gmail.com>
Co-authored-by: Pieter van Zyl <20579513+PieterVanZyl-Dev@users.noreply.github.com>
Co-authored-by: mel <mcmelon@nodiumhosting.com>
Co-authored-by: Theo Browne <me@t3.gg>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Tristan Knight <tris203@gmail.com>
Co-authored-by: Christoph Herzog <a.github@omega-id.com>
Co-authored-by: Shoaib <shoaib050326@gmail.com>
Co-authored-by: Shoaib Ansari <shoaibansari@Shoaibs-Mac-mini.local>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Guilherme Vieira <46866023+GuilhermeVieiraDev@users.noreply.github.com>
Co-authored-by: James <105842516+jamesx0416@users.noreply.github.com>
Co-authored-by: Julius Marminge <jmarminge@gmail.com>
Co-authored-by: root <root@localhost.localdomain>
Co-authored-by: Andrew Forster <76947376+Andrew-Forster@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: Chris Michael Guzman <67719167+Chrrxs@users.noreply.github.com>
Co-authored-by: Vadym Kotai <vdmkotai@gmail.com>
Co-authored-by: Utkarsh Patil <73941998+UtkarshUsername@users.noreply.github.com>
Co-authored-by: xxashxx-svg <xxanshxx9@gmail.com>
Co-authored-by: Maxwell Young <maxtheyoung@gmail.com>
Co-authored-by: Yordis Prieto <yordis.prieto@gmail.com>
Co-authored-by: Rhiz3K <33246262+Rhiz3K@users.noreply.github.com>
Co-authored-by: Rhiz3K <rhiz3k@protonmail.com>
Co-authored-by: Anirudh Coontoor <me@anirudhs.net>
Co-authored-by: Rusiru Sadathana <rusirusadathana@gmail.com>
Co-authored-by: ss <69873514+sandersonstabo@users.noreply.github.com>
Co-authored-by: wizzoapp[bot] <254688279+wizzoapp[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant