HuaRenCa
Back to Forum
Community

[Solved] Codex can't switch accounts anymore?!

glopay
glopay

2 weeks ago

Found a solution—seems to be a bug. I'm never going to carelessly upgrade again.

Step 1: Restart the Codex background daemon

codex app-server daemon restart

Step 2: Check authentication

codex login status

Step 3: Start Codex again

codex

I have about four or five Codex accounts, and I used to switch to the next one after finishing with each. I hadn't upgraded in a long time. Today I carelessly clicked yes when it asked if I wanted to upgrade while switching accounts. And then this came up:

Your access token could not be refreshed because you have since logged out or signed in to another account. Please sign in again.

The OS is Ubuntu, and I'm using the CLI... Codex version is 0.167

3
1.3K

Comments (3)

Your avatar
Sign in to comment
speing
speing2 weeks ago

Multi-account rotation was never officially supported to begin with. This upgrade most likely tightened the token refresh logic, treating "logout or switch account" as a state that requires re-authentication. The fact that restarting the daemon fixes it suggests the cached state and the background process are out of sync. But whether this command will keep working long-term is hard to say—the next minor update could change things again. I'd suggest holding off on enabling auto-updates for now.

午时的太阳
午时的太阳2 weeks ago

If the same account is also running on another machine or container, the old session may be invalidating the new token, which can look a lot like this error. If you can, please share the output of codex --version and the exact login status output after restarting—that'll give others a clearer reference when troubleshooting.

郑雄
郑雄2 weeks ago

Does this happen the same way on the macOS or Windows CLI?