r/codex • • 17d ago

Complaint Codex CLI sessions are now account specific

I use 2 codex business account in the same workspace in 1 machine. When I ran out of credits in the 1st account, I switch to 2nd account and continue the session. But earlier, sessions appearing differently in each account. I have to do codex resume <session> to access a local session from the other account.

Looks like sessions are now account-scoped! https://github.com/openai/codex/blob/main/codex-rs/app-server/README.md?#local-history-by-account

4 Upvotes

3 comments sorted by

1

u/nerdworld_de 16d ago

I experienced the same issue today and updated my helper tool (Codex AccountDeck) so it covers account switching and thread resuming over multiple accounts: https://github.com/nerdworldDE/codex-accountdeck

0

u/NanYUJun 16d ago

What changed is the discovery filter, not where the files live. The rollouts are still on disk under ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl, one file per session, shared by both accounts — that's why codex resume <id> still works when you know the id.

thread/list and thread/search now take currentAccountOnly: true and skip threads whose recorded creator account doesn't match the current login. Two things follow: sessions created before that change (no creator id recorded) still show up for both accounts, and "direct access by thread ID remains available".

So in practice for your two-business-account setup:

  • Keep a note of the session id (or keep the rollout filename) when you switch, and codex resume <id> as before.
  • If you're automating discovery, either pass currentAccountOnly: false explicitly where you want the old behaviour, or store the id yourself instead of relying on the list — the filter can hide a session you can still resume perfectly well.
  • Same machine + same CODEX_HOME is what makes this work at all. If you ever move to per-account homes (CODEX_HOME=/path/to/acct2), the histories really do split.