-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Description
Summary
When multiple Codex CLI sessions are open (e.g., several terminal tabs), /status in every tab shows the metadata for whichever session logged in most recently. That means the command never reflects the session that is actually running in that tab—it always mirrors the newest login’s account, limits, and session ID. This makes it impossible to see which account or workspace a long‑running session is using, especially when juggling Plus/Pro accounts or different sandboxes.
Steps to reproduce
- Open Terminal tab A and run
codex, sign in with ChatGPT, and note the session ID shown at startup (Session A). - Open Terminal tab B, run
codex, and sign in with either the same or a different ChatGPT account (Session B). Leave both tabs running. - In tab A, run
/status.
Expected behavior
/status in tab A should show Session A’s account email, plan, sandbox, limits, and session ID—the context for the TUI instance that is currently running.
Actual behavior
/status in tab A now shows Session B’s account information (the most recently authenticated session). The account email, plan, usage bars, and session ID all match tab B, even though commands in tab A still execute in Session A. The same happens for any other tabs: /status is globally bound to “latest login” rather than the active process.
Impact
- You cannot confirm which account, workspace, or limits apply to the session you’re actually interacting with.
- Switching accounts in a fresh tab makes all earlier tabs lie about their identity, leading to accidental rate‑limit hits or running tasks under the wrong Plus/Pro account.
- Support/debugging becomes harder because screenshots or logs from
/statusare untrustworthy unless you guarantee no other tab has logged in since.
Environment
codex-cli0.55.0- macOS 15 (Darwin 25.0.0 arm64)
- Auth: Sign in with ChatGPT (multiple Plus/Pro accounts repro the issue)
Additional context
This regression started once I began juggling several sessions (e.g., work vs. personal). The behavior is consistent: whichever tab logs in last “owns” /status for all running TUIs until another login occurs.