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
Support switching ChatGPT/OpenAI accounts without losing the current session #18806
What version of the Codex App are you using (From “About Codex” dialog)?
26.417.41555 (1858)
What subscription do you have?
Not specified
What platform is your computer?
macOS 26.4.1 (25E253)
What issue are you seeing?
Logout/login works normally, but there is no way in the Codex desktop app to switch to a different ChatGPT/OpenAI account without first logging out.
The profile dropdown only exposes actions like Settings, Workspace settings, Rate limits remaining, and Log out. There is no visible "Add account", "Switch account", or "Use another ChatGPT/OpenAI account" action.
This is disruptive because logging out drops the current Codex app session/context.
What steps can reproduce the bug?
Sign in to the Codex app with ChatGPT/OpenAI account A.
Start or keep an active local Codex session/thread you do not want to lose.
Open the profile dropdown in the app.
Try to switch to ChatGPT/OpenAI account B without logging out.
Observed result:
The app does not provide an in-place account switch flow.
The only obvious path is to log out and log back in with the other account.
Logout/login itself works, but it discards the current app session/context.
What is the expected behavior?
The Codex app should provide an account-switching flow such as:
Add account / Use another account, or
Switch account while preserving the current local session history/context.
At minimum, users should not have to destroy the current app session just to move between ChatGPT/OpenAI accounts.
Additional information
This is different from bugs where the logout button is broken or unresponsive. In this case, logout works correctly; the issue is that account switching requires logout and causes session loss.
Reacted by Jiyuan, cpaquot, Joe, Chris Hamstead, Sergei Scherbakov, Jack Collins, Linda H , Meryovi De Dios, axelcursive, Craig Walker and 4 more
changed the title [-]Codex app cannot switch ChatGPT/OpenAI accounts without losing the current session[/-][+]Support switching ChatGPT/OpenAI accounts without losing the current session[/+]on Apr 21, 2026
It adds --auth-profile NAME and CODEX_PROFILE=NAME, where each auth profile has its own Codex home under $CODEX_HOME/profiles/NAME. That means users can keep personal/work auth credentials, config, sessions, logs, MCP/plugin state, daemon/socket state, feature flags, memories, and related local state separate instead of overwriting the current default account state.
So this does not implement a TUI/browser-style "switch account mid-session" flow by itself, but it should make account switching much safer by giving each account/workspace an isolated state root.
I could not create an upstream PR from this account because GitHub rejected PR creation against openai/codex, so I am sharing the pushed branch/compare link here.
Validation run:
cargo fmt --all
git diff --check
cargo test -p codex-utils-home-dir
cargo test -p codex-rmcp-client oauth::tests
cargo test -p codex-cli --bin codex auth_profile
cargo test -p codex-core build_exec_request_preserves_windows_workspace_roots
broad affected-crate cargo check across home-dir, cli, core, rmcp, mcp, app-server, daemon, chatgpt, cloud-tasks, tui, and exec crates
My use case involves two separate accounts with different email addresses: a personal ChatGPT account and an enterprise account for Codex.
Please extend account switching to Codex Desktop and the native ChatGPT mobile apps. I want to use personal ChatGPT and access enterprise Codex Remote tasks on the same phone without repeatedly signing out.
Accounts should remain fully isolated, preserving their respective histories, workspace policies and remote-device pairings. Ideally, notifications from both accounts would identify the account and open the relevant task under the correct identity.
I would also like native multi-account switching in the Codex desktop app on Windows.
I currently use a local account-switching plugin that saves multiple accounts, but switching requires restarting Codex. This interrupts ongoing work, and the task cannot automatically continue after restart.
My main requests are:
Keep multiple accounts signed in and clearly display the active account.
Allow switching accounts without restarting the app.
Preserve local task progress and conversation context, with an explicit option to resume under the selected account where authorized.
Show each account’s remaining usage and reset time.
Optionally offer switching when usage is exhausted, with a cancellable countdown.
Account credentials, cloud data, and workspace permissions should remain isolated. The main goal is to reduce interruptions during long coding tasks.
Activity
[-]Codex app cannot switch ChatGPT/OpenAI accounts without losing the current session[/-][+]Support switching ChatGPT/OpenAI accounts without losing the current session[/+]Ducksss commentedon Jun 3, 2026
This branch may be relevant as a partial/adjacent path for this request, though I would not describe it as a full in-session hot account switcher:
Branch: https://github.com/Ducksss/codex/tree/PinZheng/auth-profiles-review
Compare: https://github.com/openai/codex/compare/main...Ducksss:PinZheng/auth-profiles-review?expand=1
It adds
--auth-profile NAMEandCODEX_PROFILE=NAME, where each auth profile has its own Codex home under$CODEX_HOME/profiles/NAME. That means users can keep personal/work auth credentials, config, sessions, logs, MCP/plugin state, daemon/socket state, feature flags, memories, and related local state separate instead of overwriting the current default account state.So this does not implement a TUI/browser-style "switch account mid-session" flow by itself, but it should make account switching much safer by giving each account/workspace an isolated state root.
I could not create an upstream PR from this account because GitHub rejected PR creation against
openai/codex, so I am sharing the pushed branch/compare link here.Validation run:
cargo fmt --allgit diff --checkcargo test -p codex-utils-home-dircargo test -p codex-rmcp-client oauth::testscargo test -p codex-cli --bin codex auth_profilecargo test -p codex-core build_exec_request_preserves_windows_workspace_rootscargo checkacross home-dir, cli, core, rmcp, mcp, app-server, daemon, chatgpt, cloud-tasks, tui, and exec cratesaxelcursive commentedon Sep 14, 2026
My use case involves two separate accounts with different email addresses: a personal ChatGPT account and an enterprise account for Codex.
Please extend account switching to Codex Desktop and the native ChatGPT mobile apps. I want to use personal ChatGPT and access enterprise Codex Remote tasks on the same phone without repeatedly signing out.
Accounts should remain fully isolated, preserving their respective histories, workspace policies and remote-device pairings. Ideally, notifications from both accounts would identify the account and open the relevant task under the correct identity.
stevenpcny commentedon Oct 24, 2026
I would also like native multi-account switching in the Codex desktop app on Windows.
I currently use a local account-switching plugin that saves multiple accounts, but switching requires restarting Codex. This interrupts ongoing work, and the task cannot automatically continue after restart.
My main requests are:
Account credentials, cloud data, and workspace permissions should remain isolated. The main goal is to reduce interruptions during long coding tasks.