Skip to content

[Bug]: Codex session disappears after account switch when pane routes from managed home to ~/.codex (macOS 1.4.218) #25000

Closed

Description

@tianlrz

Operating system

macOS 27.0 (build 26A428), Apple Silicon

Orca version

1.4.218

Details

Summary

After switching Codex accounts in Orca, the session list for the same existing folder appeared empty. The conversation was still intact in an Orca-managed account home, but the new pane was routed to the real/default Codex home (~/.codex). Manually restoring the session into the effective home made it resumable again.

This report is based on one observed incident and local recovery, not a clean-room reproduction. The exact sequence of account-picker actions was not captured.

Observed workflow

  1. Use a Codex conversation in an existing folder registered in Orca as a folder workspace.
  2. Switch Codex accounts in Orca.
  3. Open Codex's session/resume list for the same folder.
  4. The previous conversation is no longer visible, making it appear that the folder has no sessions.

Evidence collected before recovery

  • The old conversation's rollout file and threads row remained under:
    ~/Library/Application Support/orca/codex-accounts/<managed-account-id>/home/.
  • Its recorded working directory matched the folder being opened.
  • The affected folder's current Codex pane binding in codex-pane-accounts.json had:
    selectionKey: "host", accountId: null, homeRoute: "real-home".
  • The old conversation was absent from the current/default home's thread index before restoration.
  • The old conversation's creator_user_id and creator_account_id matched those of the newly created conversation in the current/default home. This does not look like a simple mismatch between the conversation's owner and the currently used account.
  • Codex CLI version: 0.160.0.

No credentials, account identifiers, personal folder paths, or conversation content are included in this report.

Recovery and verification

After backing up both homes' SQLite databases, we copied just the affected rollout file into ~/.codex/sessions/ and imported its corresponding thread metadata and paginated history rows into the current home's databases, preserving the original creator metadata. The imported history included 27 turn rows and 767 item rows.

Launching codex resume <session-id> -C <same-folder> in a new Orca terminal successfully restored the conversation through its most recent messages and reached an idle prompt. The original managed-home data was preserved. No authentication files were copied or changed.

This verifies that the conversation was not deleted and was readable by the current Codex installation; it does not establish the precise implementation cause of the failed discovery.

Expected behavior

An account/home-route transition should keep an existing local conversation discoverable or provide an explicit explanation and a supported recovery/transfer action. If account isolation intentionally prevents discovery, the UI should communicate that scope rather than simply making the folder appear to have no sessions.

Please check the managed-account-home → real-home transition, including the effective pane home and paginated history/index handling. I am not asking for unrestricted sharing of histories across unrelated accounts.

Related reports

Activity

  1. added 2 commits that reference this issue on Oct 25, 2026
    a3cacfb
    947f434
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions