[CLI 0.154.0] Resumed session remains locked to Luna Reserve after switching to API key authentication
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What version of Codex CLI is running?
codex-cli 0.154.0
What subscription do you have?
ChatGPT Pro; switched to API key authentication.
Which model were you using?
Luna Reserve Max (stuck); gpt-6-astra (worked when explicitly specified with -m during resume).
What platform is your computer?
Ubuntu 22.04
What terminal emulator and version are you using (if applicable)?
No response
Codex doctor report
What issue are you seeing?
On Ubuntu 22.04 with Codex CLI 0.154.0, an existing conversation remained stuck in "Luna Reserve Max" after I switched from ChatGPT authentication to API key authentication.
I verified the active authentication method with codex login status, which confirmed API key authentication.
However, running codex resume --last still resumed the conversation in Luna Reserve. Within the resumed session, /model would not let me select other models.
Exiting the CLI and running codex resume --last -m gpt-6-astra resolved both symptoms:
- The same conversation resumed normally with Astra.
/modelwas no longer restricted to Luna Reserve, and I could select other models again within that conversation.
The explicit model override therefore did more than select Astra at startup: it also restored the ability to switch models through /model in the existing conversation.
The problem is not simply that resuming a session preserves its previous model. The problem is that the interactive model picker remained restricted after switching to API key authentication, even though an explicit model override worked and restored normal model selection.
What steps can reproduce the bug?
The following sequence was observed on Ubuntu 22.04 with Codex CLI 0.154.0:
-
Have an existing Codex CLI conversation showing "Luna Reserve Max".
-
Switch from ChatGPT authentication to API key authentication.
-
Run:
codex login statusConfirm that API key authentication is active.
-
Resume the affected conversation without an explicit model override:
codex resume --last -
Run
/modelin the resumed session and attempt to select another model. The session remains restricted to Luna Reserve, and other models cannot be selected. -
Exit the CLI and resume the same conversation with an explicit model override:
codex resume --last -m gpt-6-astra -
Observe that the original conversation resumes normally with Astra.
-
Run
/modelagain in that resumed conversation. Other models can now be selected, confirming that the explicit-moverride also cleared the interactive model-selection restriction.
Before the workaround:
codex login statusconfirmed API key authentication.codex resume --lastleft the conversation in Luna Reserve./modeldid not allow switching to other models.
After the workaround:
codex resume --last -m gpt-6-astraresumed the same conversation with Astra./modelallowed switching to other models again.
This report documents the observed behavior in the affected existing session; it does not establish whether all sessions or other Codex clients are affected.
What is the expected behavior?
After switching to API key authentication, a resumed session should allow me to select models available to that API account through the interactive model picker.
Preserving the previously selected model when resuming is understandable, but the interface should not remain locked to Reserve when another model is available under the active authentication method.
An explicit command-line model override should not be necessary just to leave Reserve mode and continue the existing conversation with an available API model.
Additional information
Confirmed workaround in my environment:
codex resume --last -m gpt-6-astra
This allowed me to continue the original conversation without starting a new one.
Potentially related: #42830.
I am filing this separately to document the CLI authentication-switching and session-resume scenario on Ubuntu 22.04 with CLI 0.154.0. I have not confirmed whether it shares the same implementation-level root cause as #42830. Please mark it as a duplicate if it belongs under the same fix.
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
Reproduce on Ubuntu 22.04 with Codex CLI 0.154.0 using codex login status, codex resume --last, and /model, then compare with codex resume --last -m gpt-6-astra. Trace the resume, authentication, and interactive model-selection entry points; done means a resumed session using API key authentication can select available models without requiring an explicit override.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- authentication, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100