Add account/workspace switching support

Open 💬 5 comments Opened Jun 30, 2026 by zhangshuai8413

Feature request

Codex currently supports signing out and signing back in, but it does not appear to support quick switching between multiple accounts or workspaces.

Requested behavior

  • Show the current signed-in account and workspace clearly in Codex app, CLI, and IDE extension.
  • Add a switch account/workspace action.
  • Keep separate cached sessions per account/workspace where possible.
  • Avoid requiring users to repeatedly log out and log back in.

Use case

Developers often need to switch between personal and company accounts, or between different ChatGPT workspaces/API organizations. Re-authenticating each time is inconvenient and can lead to confusion because permissions, billing, and managed workspace policies may differ by account or workspace.

Current workaround

Run codex logout and then codex login again with the other account.

View original on GitHub ↗

5 Comments

TarjinderSingh · 1 month ago

This is important for anyone using Codex across academic, private, and organizational work.

These contexts often have different policies, not just different subscriptions. A university/lab workspace, a private consulting account, and a personal account may differ in data handling rules, admin controls, approved connectors, billing, and acceptable tool/plugin use.

The current logout/login workflow makes it too easy to lose track of which account or workspace is active. That is more than an inconvenience: it can put work under the wrong policy boundary, use the wrong connector permissions, or mix usage and project context across settings that should stay separate.

Codex should show the active account/workspace clearly and support fast switching with separate cached sessions. This also overlaps with #14330, because for project-based work the account/workspace often needs to align with repo-specific config, tools, and policy.

andreagrandi · 1 month ago

A concrete CLI/TUI use case for the “show the current signed-in account and workspace clearly” part of this request:

I run personal and work ChatGPT accounts concurrently in separate terminals, isolated with different CODEX_HOME directories. The two Codex TUIs are visually indistinguishable, making it easy to run work under the wrong account/workspace.

Current limitations in Codex CLI 0.144.5:

  • codex login status reports only Logged in using ChatGPT, not which account or workspace is active.
  • [tui].status_line has no account, email, workspace, profile, CODEX_HOME, or config-label item.
  • The status line accepts only fixed built-in item IDs; it cannot display a literal per-config label such as WORK or PERSONAL.
  • Terminal-title fields have the same fixed-item limitation.

Please support at least one of these:

  1. Built-in account and/or workspace status-line items derived from the authenticated session of that specific TUI process.
  2. A privacy-safe static label stored in each config, for example:
[tui]
status_line_label = "WORK"
status_line = ["status-line-label", "model-with-reasoning", "current-dir"]

A user-defined label is a useful fallback when exposing an email address is undesirable or when several accounts have similar workspace names.

Acceptance criteria:

  • Separate CODEX_HOME configurations can display distinct persistent labels.
  • The identity/label remains visible in the TUI footer while multiple sessions run in parallel.
  • Any account-derived value reflects the current TUI session, not the most recently authenticated global session.
  • Email/PII display is opt-in or appropriately redacted.

This matters beyond convenience: accounts may have different billing, rate limits, data-handling rules, managed policies, and connector permissions.

Related: #17827 (custom/command-backed status line), #16621 (profile status-line item), #4432 (multi-account auth profiles), and #6360 (session-specific account correctness).

chonorov · 14 days ago

Please make this a first-class, consistent account switcher in both Codex Desktop and the Codex mobile experience. I regularly alternate between two legitimate ChatGPT accounts on the same Mac mini and phone. The current sign-out plus full OAuth/MFA flow interrupts active work and makes it too easy to act under the wrong account.

Expected UX:

  • keep multiple accounts signed in;
  • switch in one or two clicks/taps;
  • always show the active account/workspace prominently;
  • preserve each account's projects, tasks, chat history, usage limits, settings, and authentication state;
  • offer the same account list and switching behavior in Desktop and mobile/Remote Control.

This is account switching, not merging accounts. Please coordinate the desktop scope in #31778 with the mobile scope in #31187 so the experience ships consistently.

aderici · 11 days ago

Is there a strategy to "not bring this"? If so tell us so i will find another provider or a solution. This is frustrating. I need to be able to use codex mobile with 2 accounts on mobile. Because i have an account under company email and another one i use personally on personal email. But i have a single phone

huangdijia · 2 days ago

I would like to add a more specific workspace-switching use case for Codex Desktop: one ChatGPT account can belong to both a Personal workspace and a Business workspace.

Today, users need a fast and unambiguous way to move between those workspaces without signing out or completing OAuth again. This is distinct from switching between two different login accounts.

Suggested acceptance criteria for the desktop app:

  • The active ChatGPT workspace is always visible in the main UI.
  • A user can switch between an available Personal workspace and Business workspace in one or two clicks.
  • After switching, Codex immediately uses the selected workspace's usage limits, admin policies, connectors/plugins, projects, and task history.
  • The app does not display or execute a task under the wrong workspace while switching.
  • Local project folders remain available, while workspace-scoped cloud data and permissions stay isolated.

This would make mixed personal/work usage both faster and safer, especially when the two workspaces have different data-handling and administrator policies.