fix(codex): Pro Max accounts load, so Ultrafast shows up #14304
main fromrefs/pull/14304/head·merged by t3dotgg(GitHub profile, opens in a new tab) View on GitHubCodex 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
PlanTypeas 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 fivePlanTypeenums. promaxaccounts 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"witheffort: "low"inthread/settings/updated. - Decoding a
promaxaccount response failed withExpected V2GetAccountResponse__PlanTypebefore the fix and passes after. schema.test.tsandCodexProvider.test.tspass. Typecheck passes foreffect-codex-app-serverandapps/server.


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
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
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.tsapps/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
promaxas “ChatGPT Pro Max Subscription” and overrides theultrafastservice-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.tsThe generator overrides PlanTypewith a string schema and uses the upstream definition when no override exists. The account schema test coverspromaxandsome_future_plan.codexPlanLabelmapspromaxto “ChatGPT Pro Max Subscription.”Override the ultrafast tier description
apps/server/src/provider/Layers/CodexProvider.ts,apps/server/src/provider/Layers/CodexProvider.test.tsThe provider uses “Even faster, more expensive” for ultrafastwhen 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:
juliusmarmingeMerge Risk: ⚪ Minimal · up to
45333The 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 name Status Explanation Resolution Docstring Coverage ⚠️ Warning Docstring 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 name Status Explanation Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request. Title check ✅ Passed The title clearly identifies the Pro Max account fix and the resulting Ultrafast availability. Description check ✅ Passed The 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.Approvability#
Verdict: Approved at
45333aeMacroscope'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).macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Thread transfer impact#
✅ Thread transfer remains within every enforced ceiling.
Baseline:
408ff8a· PR result:45333ae· Source CI: successScenario 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.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.