Skip to content

[Bug]: Regression in 1.4.196: Codex session history no longer bridged between managed accounts #18486

Closed

Description

@jmdall

Operating system

Windows

Orca version

v1.4.196

Details

Short summary:

Codex session history is no longer being bridged between Orca-managed accounts.

This appears to be a regression of #10757 / #10770. That issue was previously fixed by bridging session files between managed Codex homes so that /resume would still see conversations after switching accounts.

I did not have this problem before, but it is reproducible on Orca 1.4.196.

What happened?

I have multiple Orca-managed Codex accounts.

I started a Codex session using account A, closed it, then switched to account B.

The session is no longer available from account B with:

codex resume <session-id>

The session file still exists in account A's managed CODEX_HOME, so no history was actually deleted.

The important difference is that older sessions are present in BOTH managed account homes, while sessions created now are present only in the account that created them.

For example, older sessions exist under both:

~/.local/share/orca/codex-accounts/<account-A>/home/sessions/...
~/.local/share/orca/codex-accounts/<account-B>/home/sessions/...

But a session created today exists only under:

~/.local/share/orca/codex-accounts/<account-A>/home/sessions/...

and is missing from account B's home.

If I explicitly launch Codex with account A's CODEX_HOME, the session resumes correctly:

CODEX_HOME="~/.local/share/orca/codex-accounts/<account-A>/home" \
  codex resume <session-id>

However, that also uses account A's authentication, so it does not solve the normal workflow of switching to account B and continuing the same conversation.

How can we reproduce it?

  1. Configure at least two Orca-managed Codex accounts.
  2. Select account A.
  3. Start a new Codex session and send a few messages.
  4. Close the session.
  5. Switch Orca to account B.
  6. Try to resume the session from account B.
  7. The session is missing from codex resume.
  8. Inspect both managed CODEX_HOME sessions/ directories.
  9. The new rollout file exists only in account A's home.

Expected:

The session bridge should make the session available after switching managed Codex accounts, as implemented by #10770.

Actual:

New sessions are no longer copied/bridged to the other managed Codex homes.

Anything else that might help:

Environment:

  • Orca 1.4.196
  • Windows + WSL2
  • Codex CLI 0.153.0

Related:

#10757 was closed after the maintainer confirmed that each isolated CODEX_HOME caused /resume to lose visibility after account switching, and #10770 was described as the fix that bridges each account's session files.

This looks like that session-bridge behavior has regressed.

Activity

  1. added theissue type on Sep 3, 2026
  2. jmdall commented on Sep 3, 2026

    @jmdall
    ContributorAuthor

    I think I found a likely regression source: #16854 / commit 5ff1aa5 ("WSL direct-home cutover"), merged Aug 31.

    Before this change, WSL Codex account selection used syncWslRuntimeForCurrentSelection(). The new code resolves a direct per-account home with getWslCodexHomePathForSelection().

    The WSL session bridge that runs afterwards only bridges:

    systemCodexHomePath -> managedCodexHomePath
    

    It does not bridge sessions between the per-account managed homes.

    That seems to explain the regression exactly: sessions created before the direct-home cutover are present in both account homes, while a newly-created session is present only in the managed home of the account that created it.

    So this may actually have started in 1.4.195 rather than 1.4.196.

  3. guyster323 commented on Sep 4, 2026

    @guyster323

    Additional Windows reproduction / data point (all local account IDs, session IDs, usernames, and absolute paths intentionally omitted):

    I am seeing a closely related failure mode that may help narrow the regression.

    Observed behavior

    • Multiple Orca-managed Codex accounts are configured.
    • Switching accounts works for authentication, but session continuity does not.
    • codex resume <session-id> fails with:
    ERROR: No saved session found with ID (...). Run `codex resume` without an ID to choose from existing sessions.
    
    • In the Orca terminal, CODEX_HOME resolves to the shared Orca runtime home:
    <orca-user-data>/codex-runtime-home/home
    
    • However, the rollout JSONL for the target session is not present under:
    <orca-user-data>/codex-runtime-home/home/sessions/...
    
    • The same rollout JSONL is present under one or more managed account homes:
    <orca-user-data>/codex-accounts/<account-id>/home/sessions/...
    

    In one case, the exact same rollout file was already present under two different managed account homes, while still being absent from the shared runtime home's sessions tree.

    This means the problem is not necessarily only “the rollout was never copied to the newly selected account.” There also appears to be a routing/state-root mismatch: the interactive shell reports the shared runtime home as CODEX_HOME, while the resumable session data actually lives under per-account homes.

    Why this matters

    This can produce the following sequence:

    1. Session data exists on disk and is not lost.
    2. Orca switches authentication to another managed account.
    3. The shell or process attempts codex resume <id> against the runtime home.
    4. The runtime home's sessions tree does not contain that rollout.
    5. Codex reports No saved session found, even though the rollout exists under Orca-managed account homes.

    There may therefore be two overlapping regression surfaces:

    • The session bridge no longer populates sibling managed homes consistently, as already described in this issue.
    • Resume launch or CODEX_HOME routing no longer points Codex at the home that actually contains the session.

    Related prior fix

    PR #10770 explicitly addressed this class of issue by bridging rollout history across visible Codex homes and described the intended UX as keeping history available across account switches. It also notes that Codex's resume picker only reads rollouts under its launch CODEX_HOME.

    The current behavior therefore looks like a regression of the same architectural assumption: authentication isolation and session continuity are coupled through CODEX_HOME again.

    Suggested fix direction

    I think the robust model should be:

    Account identity / authentication: per managed account
    Session state / resume visibility: shared across managed accounts
    

    Possible implementation directions:

    1. Restore or ensure that the managed-home session bridge runs on every relevant host account-selection and launch path, including after recent runtime-home or direct-home changes.
    2. Ensure codex resume <id> is launched with a CODEX_HOME whose sessions tree contains the target rollout.
    3. Preferably decouple resumable session state from authentication state so that switching accounts does not change the session namespace.
    4. If resume routing selects a per-session home, overlay or use the currently selected account credentials without forcing the session to remain tied to the original account.
    5. Add an end-to-end Windows regression test covering:
      • Create a session on account A.
      • Switch to account B.
      • Verify that codex resume <session-id> succeeds.
      • Switch to account C.
      • Verify that the same session still resumes.
      • Verify that the rollout is not duplicated into divergent copies.

    A Claude Code-like “authentication-only switch with shared local session history” model would also avoid this UX problem entirely, although the Codex implementation could still use managed homes internally.

    Expected behavior

    Switching an Orca-managed Codex account should change only the active Codex identity and quota. It should not make an existing local conversation unresumable.

    The existing session should remain resumable across account A → B → C switches without manual copying, symlinks, or changing CODEX_HOME by hand.

  4. nwparker commented on Sep 4, 2026

    @nwparker
    Contributor

    @brennanb2025 will look

  5. AmethystLiang commented on Sep 5, 2026

    @AmethystLiang
    Contributor

    thanks for reporting. looking into it

  6. Crabbb commented on Sep 24, 2026

    @Crabbb

    Additional macOS data point for the account-switch/restart regression (Orca 1.4.210, Codex CLI 0.156.1).

    I had two active Codex chats in one Orca worktree. When the first managed Codex account reached its limit, I switched to another managed account and restarted the panes. Both panes reopened at an empty Codex prompt, and the chats were not available through /resume on the switched account.

    Read-only inspection after the incident:

    • Both rollout JSONL files still exist in both managed account homes. For each chat, the two paths are hardlinks to the same inode, so the transcripts were not deleted.
    • In one account home, both thread IDs are present in session_index.jsonl and state_5.sqlite.threads. In the other home, neither ID is indexed, although both rollout files exist there and backfill_state is marked complete.
    • At the restart boundary, Orca's terminal daemon log shows the old PTYs exiting and replacement PTYs starting with a command length of 5, consistent with bare codex. The replacement panes displayed fresh prompts rather than the prior transcripts.
    • At the restart boundary, both rollout logs had active turns with no task-complete event. I did not delete or archive these chats.

    This differs from the original report: the session-file bridge worked here, but account-local indexing and pane continuation did not. These are observations from one incident, not an isolated reproduction. Could you check index refresh after bridging rollouts and the restart path's choice between codex and codex resume <id>?

    Account IDs, thread IDs, private repository details, and absolute paths are intentionally omitted.

  7. added 3 commits that reference this issue on Oct 25, 2026
    a3cacfb
    3410c5a
    f1bd810
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions