[Bug]: Codex Luna Reserve fallback is missing from orchestrator v2
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 23k
- Forks
- 5.9k
- Avg merge
- 11h 14m
- Merged PRs (30d)
- 357
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- Check out PR #2829.
- Use a Codex account with ordinary quota exhausted and Luna Reserve available.
- Start a Codex thread through orchestrator v2.
- Select
gpt-5.6-lunawith Medium reasoning. - Send a prompt.
Expected behavior
Orchestrator v2 should match the official Codex CLI. It should detect Luna Reserve eligibility and send the turn using hidden wire model gpt-reserve.
The visible model and reasoning effort should remain gpt-5.6-luna and Medium. T3 should return to the ordinary model after Codex reports that ordinary usage is available again.
Actual behavior
#11253 tracks the same missing behavior in the current orchestrator.
I checked PR #2829 at 89459e384ad7ffa3b9dda613e9cfebf32a8979e1. The new orchestrator still uses the generated Codex protocol from before Luna Reserve support.
| Required behavior | PR #2829 |
|---|---|
Send supportsLunaReserve: true |
Missing |
Decode ordinaryUsageAllowed |
Missing |
Decode the luna_reserve banner |
Missing |
Load hidden model gpt-reserve |
Missing |
Route eligible turns to gpt-reserve |
Missing |
| Restore the normal model after recovery | Missing |
CodexAdapterV2 copies the selected model directly into turn/start. It listens for ordinary rate-limit notifications, but never performs a Reserve-capable usage read or switches models.
Failed quota-exhausted turns are terminalized instead of triggering a Reserve refresh.
Impact
Blocks work completely
Version or commit
PR #2829 at 89459e384ad7ffa3b9dda613e9cfebf32a8979e1
Environment
Compared against openai/codex main at bc5957eac9e89e66f990ed490d11e625a4a3b02c. The shared generated-protocol work can be implemented with #11253. Orchestrator v2 still needs its own session state, turn routing, queued-turn handling, and recovery tests.
Logs or stack traces
Screenshots, recordings, or supporting files
No response
Workaround
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts, especially the turn/start handling around lines 696-709, and compare the behavior with openai/codex main. Trace the usage read, session state, turn routing, queued turns, and recovery paths. Done means eligible Luna Reserve turns use hidden model gpt-reserve while preserving the visible model and reasoning, then return to the ordinary model after recovery, with recovery tests added.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100