NO useful error message when not logged in
What version of Codex is running?
codex-cli 0.27.0
Which model were you using?
gpt-5
What platform is your computer?
Darwin 24.5.0 arm64 arm
What steps can reproduce the bug?
Steps to Reproduce
- After installing Codex and trying to use it without configuring environment variables, there is no auth.json file locally and $OPENAI_API_KEY is null.
- When I start the login process and enter the LoginScreen, if I press Ctrl + C, I enter the chat interface.
What is the expected behavior?
I think that after exiting the LoginScreen with Ctrl + C, since the login was not successful, the subsequent chat should detect this state. If no auth information and no $OPENAI_API_KEY is found, it should immediately return an error like "login required".
Additionally, it would be helpful to add a /login command.
What do you see instead?
I can send messages, but once I send a query, Codex stays stuck showing "working", with reporting stream error
<img width="1652" height="904" alt="Image" src="https://github.com/user-attachments/assets/d35c67b9-ce97-457a-85cc-b959c31f1a67" />
Additional information
I’m not sure if the current behavior is intentional. If you consider this an improvement or an acceptable change, I’d be happy to contribute to Codex. I believe I can fix the above issue and also add the /login command.
Thanks!
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗