You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: don't close program when out of credits or when API key is missing #115
Program exits with an error when OPENAI_API_KEY is missing, when I have insufficient_quota, rate_limit_exceeded or when my org isn't verified to use certain models. This happens after my first prompt.
Desired
It would be nice to keep the program open and print an error to the user when this happens.
I believe there is an error printed and then the program exits? What would be the benefit of keeping codex running after hitting a fatal error that prevents it from doing anything useful in this case?
You often run out of credits when deep down a rabbit hole, so being able to present a link to the user to go fill up their balance and then continue is a good UX.
Otherwise you lose all the context you've built up and have to start from scratch, which is a "walk away from using the product" moment at least for that sesssion.
I run into this screen many times in Claude code bc I load like $25 at a time, and the url prompt to go pay them more money works every single time.
Thanks for the feedback! Please try again on the latest version of Codex CLI. If the issue persists, feel free to open a new issue or contribute to the codex-rs/ implementation.
Activity
tibo-openai commentedon Apr 16, 2025
I believe there is an error printed and then the program exits? What would be the benefit of keeping
codexrunning after hitting a fatal error that prevents it from doing anything useful in this case?jayshrivastava commentedon Apr 16, 2025
Would the program would lose the work that it started if it hits
insufficient_quotain the middle of execution?jayshrivastava commentedon Apr 16, 2025
It think it does. I just a
rate_limit_exceededand I couldn't continue bc the program exited.vonwerderc commentedon Apr 16, 2025
Yes, if there was a way to not lose all the progress when you hit the rate limit, that would be great. I had a few issues with that this afternoon.
tibo-openai commentedon Apr 16, 2025
We've pushed improvements for when rate limits are encountered. More to come.
jonchurch commentedon Apr 16, 2025
You often run out of credits when deep down a rabbit hole, so being able to present a link to the user to go fill up their balance and then continue is a good UX.
Otherwise you lose all the context you've built up and have to start from scratch, which is a "walk away from using the product" moment at least for that sesssion.
I run into this screen many times in Claude code bc I load like $25 at a time, and the url prompt to go pay them more money works every single time.
0xdevalias commentedon Apr 20, 2025
See also:
codex-maintainers commentedon Aug 7, 2025
Thanks for the feedback! Please try again on the latest version of Codex CLI. If the issue persists, feel free to open a new issue or contribute to the
codex-rs/implementation.