Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(codex): Pro Max accounts load, so Ultrafast shows up #14304

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/14304/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Codex did not load for ChatGPT Pro Max accounts, so the new Ultrafast tier never showed up. Codex 0.159 reports these accounts with plan type promax. Our Codex protocol bindings are pinned to 0.156, which does not know that value. The account/read decode failed, and the whole provider check failed with it. The usage read (account/rateLimits/read) failed the same way.

Fix

  • The protocol generator now emits PlanType as a plain string. We only use the plan for labels, so a plan slug from a newer Codex must not take the provider down. I regenerated at the same pinned ref. The only generated diff is the five PlanType enums.
  • promax accounts get the label "ChatGPT Pro Max Subscription".
  • Ultrafast gets shorter copy, "Even faster, more expensive". Codex's own description wrapped to two lines in the traits menu.

Codex model/list already reports ultrafast in serviceTiers for gpt-6-astra, and the existing Service Tier picker lists every tier. Other models only get Fast.

Not covered: the managed ChatGPT connection from #14290 hides service tiers on purpose. Ultrafast shows only on the Codex CLI login provider.

Why not a full protocol refresh to 0.159: the generator fails at rust-v0.159.0 (Unable to resolve schema type name: AccountGatewayOAuthReadResponse). That is separate work.

Proof

  • Web client on a worktree dev server with a Pro Max account: GPT-6 Astra, Low, Ultrafast, prompt "Reply with exactly: ok". The agent replied "ok", and Codex echoed serviceTier: "ultrafast" with effort: "low" in thread/settings/updated.
  • Decoding a promax account response failed with Expected V2GetAccountResponse__PlanType before the fix and passes after.
  • schema.test.ts and CodexProvider.test.ts pass. Typecheck passes for effect-codex-app-server and apps/server.

Service Tier menu with Ultrafast

Low and Ultrafast turn replies ok

Created with Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • ChatGPT Pro Max plans now display as “ChatGPT Pro Max Subscription.”
    • The Ultrafast service tier is available with the description “Even faster, more expensive.”
  • Bug Fixes
    • Account information can now be processed when it includes plan types not recognized by the current protocol, including newer plan types. Unrecognized plan values no longer prevent account data from being decoded.
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    2. github-actions[bot](GitHub profile, opens in a new tab)commented

      Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ℹ️ The exact PR base did not have a successful artifact. Baseline uses the latest successful main measurement shown below.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire13.5 KiB13.5 KiB−21 B (−0.2%)15.1 KiB✅
      CodexThread snapshot wire7.0 KiB7.1 KiB+16 B (+0.2%)7.3 KiB✅
      CodexLive turn WebSocket wire6.5 KiB6.4 KiB−37 B (−0.6%)7.8 KiB✅
      CodexLive turn WebSocket decoded56.3 KiB56.2 KiB−44 B (−0.1%)66.4 KiB✅
      CodexLive turn messages109−1 (−10.0%)21✅
      ClaudeTotal thread wire13.5 KiB13.5 KiB−14 B (−0.1%)15.1 KiB✅
      ClaudeThread snapshot wire7.1 KiB7.1 KiB+5 B (+0.1%)7.3 KiB✅
      ClaudeLive turn WebSocket wire6.5 KiB6.4 KiB−19 B (−0.3%)7.8 KiB✅
      ClaudeLive turn WebSocket decoded57.0 KiB57.0 KiB0 B (0.0%)66.4 KiB✅
      ClaudeLive turn messages990 (0.0%)21✅

      Baseline: 408ff8a · PR result: 45333ae · Source CI: success

      Scenario and decoded snapshot size

      10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

      • Codex decoded thread snapshot: 114.0 KiB
      • Claude decoded thread snapshot: 114.7 KiB

      Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

    3. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      Review in Change Stack →

      Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

      No actionable comments were generated in the recent review. 🎉

      ℹ️ Recent review info
      ⚙️ Run configuration

      Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml

      Review profile: CHILL

      Plan: Team

      Run ID: c32d6ed6-b2a2-4764-ba78-a4412a8a959b

      📥 Commits

      Reviewing files that changed from the base of the PR and between 60356f5c55f5ab44a6c7b60f222cde8e519bda8b and 45333ae389b6d6fe15e1fa43c3dc188df329aaf7.

      📒 Files selected for processing (2)
      • apps/server/src/provider/Layers/CodexProvider.test.ts
      • apps/server/src/provider/Layers/CodexProvider.ts

      Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.


      📝 Walkthrough

      Walkthrough

      The generated account schema accepts plan slugs as strings. The Codex provider labels promax as “ChatGPT Pro Max Subscription” and overrides the ultrafast service-tier description.

      Changes

      Codex provider updates

      Layer / File(s)Summary
      Accept and label newer plan slugs
      packages/effect-codex-app-server/scripts/generate.ts, packages/effect-codex-app-server/src/schema.test.ts, apps/server/src/provider/Layers/CodexProvider.ts
      The generator overrides PlanType with a string schema and uses the upstream definition when no override exists. The account schema test covers promax and some_future_plan. codexPlanLabel maps promax to “ChatGPT Pro Max Subscription.”
      Override the ultrafast tier description
      apps/server/src/provider/Layers/CodexProvider.ts, apps/server/src/provider/Layers/CodexProvider.test.ts
      The provider uses “Even faster, more expensive” for ultrafast when building service-tier descriptors. The test checks the resulting option.

      Priority: ➖ Normal

      Estimated code review effort: 2 (Simple) | ~8 minutes

      Change: Bug fix

      Suggested reviewers: juliusmarminge

      Merge Risk: ⚪ Minimal · up to 45333

      The plan and service-tier changes preserve their surrounding behavior; no material merge-blocking risk was identified.

      🚥 Pre-merge checks | ✅ 4 | ❌ 1

      ❌ Failed checks (1 warning)

      Check nameStatusExplanationResolution
      Docstring Coverage⚠️ WarningDocstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 4 files.Write docstrings for the functions missing them to satisfy the coverage threshold.
      ✅ Passed checks (4 passed)
      Check nameStatusExplanation
      Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
      Title check✅ PassedThe title clearly identifies the Pro Max account fix and the resulting Ultrafast availability.
      Description check✅ PassedThe description is detailed, focused, and explains the problem, solution, scope, validation, and UI changes. It omits the template headings and checklist, but the required information is otherwise pre…
      • Fix all pre-merge checks with AI
      ✨ Finishing Touches 💡 1
      📝 Generate docstrings 💡
      • Commit to this branch
      • Create a new PR
      🧪 Generate unit tests (beta)
      • Commit to this branch
      • Create a new PR

      Comment `@coderabbitai help` to get the list of available commands.
    4. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Approved at 45333ae

      Macroscope's review found this PR approvable — This is a focused Codex compatibility fix: newer plan slugs can be decoded, Pro Max accounts receive a label, and existing Ultrafast service-tier data gets concise copy. Existing defaults and routing remain unchanged, with the behavior covered by targeted tests.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).

Sign in to join this conversation.