Skip to content

Codex Desktop: Switching OpenAI accounts shows previous account's projects and conversations #35657

Open

Description

@mhmtarif

What version of the Codex App are you using (From “About Codex” dialog)?

kMDItemVersion = "26.721.41059"

What subscription do you have?

one of them Free one of them plus

What platform is your computer?

Mac M1

What issue are you seeing?

Description

When switching between two different OpenAI accounts in Codex Desktop on macOS, the application continues to display the previous account's recent projects and conversations.

This appears to be local state being shared across accounts instead of being isolated per authenticated user.

Environment

  • OS: macOS
  • Codex Desktop version: <fill in from Codex → About Codex>

Steps to reproduce

  1. Sign in to OpenAI Account A.
  2. Open or create several Codex projects.
  3. Sign out.
  4. Sign in to a different OpenAI account (Account B, different email address).
  5. Open the Recent Projects list.

Expected behavior

The application should show only Account B's projects and conversations.

Each OpenAI account should have an isolated local workspace/session so users can switch between accounts without clearing application data.

Actual behavior

The Recent Projects list still contains projects and conversations from Account A.

Example project titles include:

  • Isolate projects by account
  • Add TokenService tests
  • Add public checkbox
  • Investigate variant removal bug

The local state appears to be shared across accounts.

Notes

  • The two accounts use different email addresses.
  • This is not related to using the same phone number.
  • Clearing the application's local data removes the issue temporarily, but that is not a viable solution because switching accounts should preserve each account's own local state independently.
  • This may have privacy implications if users can see another account's recent work after switching accounts.

What steps can reproduce the bug?

  1. Sign in to OpenAI Account A.
  2. Open or create several Codex projects.
  3. Sign out.
  4. Sign in to a different OpenAI account (Account B, different email address).
  5. Open the Recent Projects list.

What is the expected behavior?

The application should show only Account B's projects and conversations.

Each OpenAI account should have an isolated local workspace/session so users can switch between accounts without clearing application data.

Additional information

No response

Activity

  1. added
    app
    on Jul 27, 2026
  2. added
    bug
    auth
    session
    on Jul 27, 2026
  3. 2568xt commented on Sep 23, 2026

    @2568xt

    I investigated the public thread-listing path at commit 30fc6864cc1318121eca1843c217fe00ce1212f1 and found that ListThreadsParams and SQLite ThreadFilterOptions do not carry the current ChatGPT identity. The app-server's list_threads_common does not pass an identity filter either.

    There is an important distinction between creator metadata and access control. #47113, merged September 21, adds optional creator_user_id and creator_account_id and explicitly tests resuming a thread with different authentication while preserving its original creator. Older, API-key, and imported sessions may lack these values. Consequently, applying an unconditional creator equality filter would introduce compatibility decisions; it would not, by itself, implement access isolation.

    I reproduced local list sharing using the official macOS ARM64 CLI from rust-v0.157.0-alpha.2, commit e9f240c5b6edcf7f21e79397cb9caac61a2059c4, which includes #47113:

    1. In one temporary CODEX_HOME, pre-seed two synthetic JSONL sessions with distinct creator_user_id and creator_account_id pairs.
    2. Load synthetic external ChatGPT auth A with account/login/start (chatgptAuthTokens); confirm its email and workspace via account/read.
    3. Call thread/list with modelProviders: [], both normally and with useStateDbOnly: true.
    4. Call account/logout, load synthetic auth B, confirm the new identity, and repeat both list calls.

    Both list modes return both sessions under both identities. A read of the temporary SQLite database confirms that each thread retains its distinct creator user/account pair. The backend is a loopback fixture and no real credentials, conversation data, or inference service are used.

    This is a pre-seeded local app-server observation, not a real-account thread/start, Desktop UI, or cross-device/cloud reproduction. It does not establish the implementation of stores outside this repository or prove a cloud authorization bypass.

    Could maintainers clarify the intended boundary: should Desktop filter the visible list independently of shared local CLI history, or should the underlying store enforce authenticated-owner access? If only list visibility is intended, the SQLite/JSONL fallback paths and pagination need consistent semantics. If authorization is intended, read/resume/search/loaded threads and account changes also need coverage; filtering only thread/list would leave other access paths unchanged.

  4. federicorinaldi commented on Oct 6, 2026

    @federicorinaldi

    I can reproduce a closely related case on macOS where the two accounts are not even switched inside Desktop.

    Environment:

    • macOS / Apple Silicon
    • ChatGPT Desktop / Codex: 26.924.22138
    • Same macOS user profile
    • Default shared CODEX_HOME (~/.codex)

    Setup:

    1. ChatGPT Desktop is signed into my work ChatGPT account/workspace.
    2. The standalone Codex CLI is signed into a different personal ChatGPT account.
    3. I use the CLI normally under the same macOS user, so it writes sessions under the default ~/.codex.
    4. Open ChatGPT Desktop while it remains signed into the work account.

    Actual result:

    • A Codex session created from the personal-account CLI appears in the Desktop Recent list while Desktop is signed into the work account.
    • I did not need to sign out of or switch the Desktop account for this to happen.
    • This makes the account boundary misleading: the Desktop UI is presenting local session state created while authenticated as a different OpenAI user.

    I have not intentionally opened/resumed the personal session from the work Desktop account, so I am only claiming cross-account visibility of the local session entry here, not a server-side authorization bypass.

    This looks consistent with the shared local-state behavior discussed in #20864: Desktop and CLI share the same CODEX_HOME / session database, but the visible session list is not scoped to the active ChatGPT identity.

    Expected behavior:

    • Sessions/projects shown by Desktop should be scoped to the active ChatGPT user/workspace, OR
    • local Codex state should be namespaced per authenticated account, OR
    • if cross-client local sessions are intentionally shared, the UI should make that explicit and must prevent accidental cross-account access.

    This has a real privacy impact for personal/work separation: a Desktop app signed into a work account can expose metadata from personal Codex activity on the same machine.

    I can provide a screenshot showing the personal CLI session appearing in the work-account Desktop sidebar if useful.

  5. themoosemarketing commented on Oct 22, 2026

    @themoosemarketing

    I'm experiencing this same issue with Codex Desktop on macOS.

    I use separate ChatGPT accounts for my personal freelance business and my full-time employer. After signing out of my personal account and signing into my employer's account, Codex Desktop continues to display my personal projects, including their previous conversation histories.

    This is a significant privacy concern. I expected switching accounts to separate their respective projects and conversations, particularly because my employer's account should not have access to confidential work associated with my personal business.

    Codex Desktop should maintain separate local project histories, conversations, and configurations for each authenticated account.

    Is account-level isolation planned for Codex Desktop?

  6. joseph-sch commented on Oct 22, 2026

    @joseph-sch

    I can reproduce this account-isolation problem in the ChatGPT desktop app on Windows, including in both directions between a separate personal account and a business/workspace account.

    Reproduction and observations

    1. Sign into the business/workspace account, then sign out and sign into the personal account. Several business chat titles appear mixed into the personal account's Recents list.
    2. Sign out of the personal account and sign back into the business/workspace account. A personal-account chat title appears in the business account's Recents list.
    3. The app shows the newly signed-in account, but the Recents sidebar includes entries from the previously signed-in account.

    Expected: The Recents list must be isolated per authenticated account, including after logout/login.

    Scope of what I verified: I confirmed cross-account chat-title visibility in the sidebar. I have not verified whether opening these entries exposes the conversation contents or whether this is stale local cache data versus an authorization defect. I can provide screenshots through an appropriate private channel if useful; I am avoiding publicly posting identifiable conversation titles.

    Earlier in-app Feedback ID: ff64ec80-aa8d-41b6-a0be-3ee922d9123e. I am following up here because in-app feedback is now disabled by my organization.

    Related: #55436 reports that an entire personal conversation was readable after switching back to a business account on Windows. This makes it important to clarify whether the cross-account exposure is limited to sidebar metadata or also includes content.

    App version was not captured at the time of the screenshots.

  7. actwebmaster commented on Nov 9, 2026

    @actwebmaster

    This also affects our business when using the ChatGPT app for macOS. This impacts our entire company, not just me individually. Please treat this issue as urgent and prioritize a fix as soon as possible.

    I do not understand why this issue is not being reported more widely or given higher priority. We consider this a serious data privacy issue for all users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appauthbugsession

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions