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
switch has no effect on Codex CLI while the shared app-server daemon is running #162
Environment: codex-auth 0.3.0, codex-cli 0.158.0, Linux x64
Recent Codex CLI versions start a shared background app-server daemon (codex app-server daemon), and new codex TUI sessions attach to it by default (--no-daemon opts out). The daemon loads auth.json once at startup and keeps the account in memory.
So after codex-auth switch:
~/.codex/auth.json and registry.json are updated correctly
quitting and relaunching codex, as the README suggests, still uses the old account, because the daemon is still running
the switch only takes effect once the daemon restarts (codex app-server daemon restart)
From the user's side it looks like switch silently does nothing.
Repro
Run codex (this starts the daemon), then quit
codex-auth switch <other account>
Run codex again: /status still shows the previous account
Suggestion
When the daemon is running ($CODEX_HOME/app-server-control/app-server-control.sock resolves), print a hint after Switched to ... pointing at codex app-server daemon restart. This is less invasive than killing Codex processes (#149), which would also end every running CLI session.
Related: #85 (same cause, via Codex App remote connections), #149.
restarting the daemon doesn't allow me to have more that one active account in separate codex CLI instances; before this i could do that (not sure if that was by design but it was a critical feature for me)
restarting the daemon doesn't allow me to have more that one active account in separate codex CLI instances; before this i could do that (not sure if that was by design but it was a critical feature for me)
Do you think switching to --no-daemon flag for codex instances themselves will help?
Resolved by #164 (merged): switch now applies the selected credentials to the running daemon — non-disruptive auth reload on codex daemons, restart fallback for upstream daemons.
Activity
feat(switch): restart the Codex app-server daemon after switching
mdbaniani commentedon Sep 28, 2026
apparently running this after a switch would help codex recognize the switched account : codex app-server daemon restart
obackhouse commentedon Sep 30, 2026
restarting the daemon doesn't allow me to have more that one active account in separate codex CLI instances; before this i could do that (not sure if that was by design but it was a critical feature for me)
codejunkienick commentedon Oct 1, 2026
Do you think switching to --no-daemon flag for codex instances themselves will help?
fix(switch): add explicit daemon restart and stale-auth recovery (#164)
Loongphy commentedon Oct 22, 2026
Resolved by #164 (merged):
switchnow applies the selected credentials to the running daemon — non-disruptive auth reload on codex daemons, restart fallback for upstream daemons.