[Bug]: Authentication switching issues on codex #11136
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
Not sure
Steps to reproduce
1- authenticate to another account on codex.
2- in settings it displays that the account has been authenticated successfully
3- continue with chat and see that it is still running on old account since we get error that limits have been used up and the new accounts does not have issues
4- restart t3 and session is updated and new authenticated account works fine.
Expected behavior
Changing the authenticated account should automatically use the new authenticated account for new messages withought having to restart t3 for the new authenticated account to work.
Actual behavior
Unless you restart t3 the switched authenticated account does not take place and work when continuing chat threads that where on the old account.
Impact
Major degradation or frequent failure
Version or commit
No response
Environment
No response
Logs or stack traces
Screenshots, recordings, or supporting files
No response
Workaround
No response
Activity
juliusmarminge commentedon Sep 10, 2026
Thanks for the report — this looks real, and the restart workaround is a strong signal.
What we think is happening
Codex login is not an in-app OAuth flow. Settings “Authenticated” comes from a short-lived
codex app-serverstatus probe that reads the currentauth.json. Existing threads keep a long-lived app-server process and reuse it for later messages (until Stop, a T3 restart, or the ~30 minute idle reaper).So after you sign into another Codex account:
That is the same shape as Claude #9607 / #11048 (CLI loads credentials once per process; T3 keeps the process).
This is not the same as switching between two configured Codex instances in the model picker (shadow-home /
CODEX_HOMEsetup in the Codex provider docs). Those threads stay bound to the instance they started on unless you pick the other account. A restart alone would not rebind them.Workaround
After changing the Codex login, Stop the affected thread (or restart T3), then send again. A new thread also picks up the new account immediately.
Fix direction
When a Codex provider refresh reports a different account identity than the live sessions for that instance, stop those sessions so the next message respawns app-server with current credentials.
account/updatedis already on the wire but does not trigger that today.To confirm the path
Please add, if you have them:
npx t3codex loginon the same Codex home, or added a second Codex instance (shadow home)Accepting as a bug.
AstroZer01 commentedon Sep 10, 2026
I just installed t3 so i am unfamiliar on how to see the version it is on, but it is on the latest one as of sending this message.
I am using both desktop and npx t3 for connecting to my server.
Both codex login and codex login --device-auth
Just used normal codex directory, ( couldnt understand shadow home to get it to work yet )
Just normal codex ran out of usage error that i used to identify that the accounts wherent switched since i switched from one that had ran out of usage to one that had 100% usage, not really important to the issue.
Just worth mentioning because if i hade usage on both accounts i wouldnt know that it didnt switch the authenticated accounts correctly.
fix(codex): pick up a new login without restarting T3
faetschi commentedon Oct 13, 2026
Confirming this on the current T3 nightly version:
System / version
0.0.46-nightly.20261013.3053— Windows desktop app (x64)0.160.1(codex login status→ "Logged in using ChatGPT")0.70.0Answers to the confirmation questions
codex loginagainst the same default Codex home (~/.codexand/or%USERPROFILE%\.codex); no shadow home in the current setup. I also sometimes switch via CodexBar.Usage limit reached/Reset time unavailable; retry manually, while Settings / Usage showed the newly signed-in account at ~98% remaining (2% used).Reproduction (current, single default provider)
codex login(or CodexBar).This matches your diagnosis exactly: the long-lived
codex app-serverprocess keeps the old tokens until a restart. Stopping the thread also works as a lighter workaround.Additional data — two-provider attempt (related: #16613)
Before this, I tried adding account A and account B as two separate Codex provider instances with the default provider disabled. That did give per-account provider switching, but:
I reverted to one default provider + external CLI/CodexBar switch + restart. So from a user's perspective "use two Codex accounts and switch when one runs out" is close, but the switch only takes effect after a restart and the two-instance path degrades to a handoff.