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
Switching to API profile after hitting codex limit not possible (codex resume --profile api fails) #4065
When I hit my gpt-5-codex usage limit in codex-cli 0.39.0, continuing work is unnecessarily painful. I expected to be able to switch to a different profile (e.g. one configured for API key auth) using the resume command, but that does not work.
Command tried:
codex resume --profile api
This fails. I had already defined profiles in my config:
I have API credits available (expiring after one year).
I want to continue my work seamlessly by switching to the api profile.
No other expiring “credit pot” with business credits when using API credits.
However, this flow is not supported. Instead, the CLI seems to push you towards topping up ChatGPT credits, which I won’t do since I already have API balance.
Expected behavior:
Allow resuming a session with a different profile (e.g. API-based) when the current one is exhausted.
If necessary, fallback to gpt-5 instead of gpt-5-codex (since gpt-5-codex is not available via API).
Actual behavior:
codex resume --profile api does not switch profiles.
No way to continue smoothly without manually starting a new session and losing context.
Environment:
codex-cli 0.39.0
Profiles as shown above
GPT-5-codex limit reached
Why this matters:
For users with API credits but no interest in topping up ChatGPT balance, the current UX creates friction and blocks progress unnecessarily 🚧.
What is the expected behavior?
Enable the use of a different billing profile with resume. Fallback model to gpt-5 as long as gpt-5-codex is not available at API.
This duplicates #2478 somewhat, and personally I don't have a preference between the two.
I think both issues show that there's a common problem of running into ChatGPT plan limits and then wanting to resume/continue on with per usage billing. This means OpenAI is leaving money on the table.. 🤷
Reacted by Paul Peavyhouse, wbdb, Ilmari Oranen, AurLemon and redblacktree
Seems like someone at OpenAI should use Codex to implement a simple failover to resume a "chatgpt" auth session using "apikey" auth.
I tried and just get the following error:
■ unexpected status 400 Bad Request: {
"error": {
"message": "The encrypted content gAAA...lA== could not be verified.",
"type": "invalid_request_error",
"param": null,
"code": null
}
Very poor usability: There is no way to know which one of these sessions are "chatgpt" auth and which ones are "apikey" so that they can be easily successfully resumed! :(
A person would have to try one auth and have a 50/50 chance they got it right the first time... or then try the other.
Activity
breadtk commentedon Oct 9, 2025
This duplicates #2478 somewhat, and personally I don't have a preference between the two.
I think both issues show that there's a common problem of running into ChatGPT plan limits and then wanting to resume/continue on with per usage billing. This means OpenAI is leaving money on the table.. 🤷
paulpv commentedon Oct 9, 2025
+100 !
Seems like someone at OpenAI should use Codex to implement a simple failover to resume a "chatgpt" auth session using "apikey" auth.
I tried and just get the following error:
paulpv commentedon Oct 9, 2025
Very poor usability: There is no way to know which one of these sessions are "chatgpt" auth and which ones are "apikey" so that they can be easily successfully resumed! :(
A person would have to try one auth and have a 50/50 chance they got it right the first time... or then try the other.
etraut-openai commentedon Nov 2, 2025
Closing in favor of #2992, which is tracking this feature request.