Codex Desktop: archived local thread cannot be resumed after restore due to mismatched path between sessions/ and archived_sessions/
What version of the Codex App are you using (From “About Codex” dialog)?
26.422.71525
What subscription do you have?
Enterprise
What platform is your computer?
macOS 26.4.1 arm64
What issue are you seeing?
A local Codex Desktop thread became unrecoverable after being archived and then restored / reopened.
The UI repeatedly shows this error:
cannot resume running thread 019ddc40-fd28-7ca3-b05a-5de11ca24124 with mismatched path:
requested `/Users/sprite/.codex/sessions/2026/04/30/rollout-2026-04-30T10-38-59-019ddc40-fd28-7ca3-b05a-5de11ca24124.jsonl`,
active `/Users/sprite/.codex/archived_sessions/rollout-2026-04-30T10-38-59-019ddc40-fd28-7ca3-b05a-5de11ca24124.jsonl`
Important detail:
local state is already back to the non-archived path, but thread/resume still believes the active rollout lives under archived_sessions/.
Environment:
Codex Desktop App version: 26.422.71525
Bundled session metadata cli_version: 0.126.0-alpha.8
Platform: macOS 26.4.1 arm64
Additional evidence:
The session file now exists only under ~/.codex/sessions/...
The row in ~/.codex/state_5.sqlite is already archived=0 and points to sessions/...
Restarting Codex does not fix the mismatch
thread/read appears to succeed, but thread/resume fails immediately with JSON-RPC error -32600
This looks like a desktop archive/restore state mismatch between the indexed thread path and a separate active rollout path used by resume.
What steps can reproduce the bug?
I do not yet have a fully minimal repro, but this is the sequence that produced the issue:
1. Create and use a normal local desktop thread.
2. Archive that thread from the Codex Desktop UI.
3. Later try to restore / reopen / resume the archived thread from the UI.
4. Codex shows a restore failure dialog with a `mismatched path` error.
5. Fully quit and relaunch Codex.
6. Retry opening the same thread.
7. The same resume failure still occurs.
Observed local state after the failure:
1. The session JSONL exists only at:
`~/.codex/sessions/2026/04/30/rollout-2026-04-30T10-38-59-019ddc40-fd28-7ca3-b05a-5de11ca24124.jsonl`
2. There is no matching session JSONL left under:
`~/.codex/archived_sessions/`
3. The row in `~/.codex/state_5.sqlite` for thread `019ddc40-fd28-7ca3-b05a-5de11ca24124` is already non-archived and points to `sessions/...`
4. Despite that, the desktop app still reports that the active rollout path is `archived_sessions/...`
Thread id:
`019ddc40-fd28-7ca3-b05a-5de11ca24124`
### What is the expected behavior?
_No response_
### Additional information
_No response_
5 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I’m seeing the same
mismatched pathresume failure text on Windows, but triggered through automation target threads rather than manual archive/restore.In my case the immediate context is several heartbeat automations with persisted
target_thread_idvalues. After using target-thread heartbeats as a workaround for the cron/new-thread automation dispatch bug (#19011), Desktop now sometimes fails before the automation starts with:or times out waiting for
thread/resume.So this may be a broader Desktop resume-state issue: if a thread id is linked from another feature such as automation heartbeat, and Desktop has stale or conflicting rollout-path state for that thread, the feature that depends on
thread/resumecan fail before doing any useful work.Not claiming this is an exact duplicate, because your repro is archive/restore-specific. The connection is that an old
target_thread_idin an automation can hit the same resume path and expose the same kind of path mismatch.Not a duplicate of #19362 — different root cause
The bot flagged #19362 as a potential duplicate, but the underlying bugs are distinct.
#19362 involves a state where SQLite correctly reflects
archived=1androllout_pathpoints toarchived_sessions/, with the file still present there. The problem is that Codex provides no graceful way to resume a legitimately-archived session. It was triggered by an auth/provider switch.This issue (#20317) is different. By the time
thread/resumefails, the local state is already fully restored:archived_sessions/sessions/2026/04/30/rollout-…-<id>.jsonlarchived=0androllout_pathpointing tosessions/…Yet the error is:
This means the Desktop process is holding a stale in-memory rollout path that was set before (or during) the archive→restore operation, and
thread/resumeuses that stale value instead of reading the current path from SQLite. The stale state survives a full app restart, which suggests it is persisted somewhere outside of SQLite and the filesystem — possibly in the app-server process state or a separate runtime cache.Why the #19362 workaround does not apply here:
The recovery script in #19362 repairs SQLite rows that are still
archived=1. In this case, SQLite is already correct. The issue is that the Desktop's resume path is not re-derived from SQLite after an archive→restore cycle.In short:
I’m seeing the same archive/session path mismatch on macOS, Codex Desktop
0.133.0-alpha.1.Toast:
Local state after failure:
sessions/...jsonlpath does not exist.archived_sessions/...jsonlfile does exist.state_5.sqlitehas no row for this thread id.session_index.jsonlstill contains the thread id and title, so the UI can still surface a non-resumable chat.Environment:
0.133.0-alpha.1session_index.jsonl:Research Salesforce agent stanceThis looks like the same class of bug: Desktop resume/session indexing can get out of sync after archive/restore or archive-related movement, leaving a visible chat that cannot be resumed.
On Windows, using the Codex extension in VSCodium with WSL, archived chats end up under
~/.codex/archived_sessions.Archive works, but I couldn’t find any unarchive option anywhere in the extension UI.
I first tried moving the rollout JSONL back into
~/.codex/sessions/YYYY/MM/DD/, but that alone did not restore the chat in Talk history. The chat only reappeared after I also updated the matching row in~/.codex/state_*.sqliteto clear the archived state.Environment:
~/.codex/archived_sessions~/.codex/sessions/YYYY/MM/DD/It would help to expose an unarchive action in the extension, or document the full recovery path for this setup.