Repository navigation
Codex Desktop Windows: archiving the active thread succeeds, then UI repeatedly resumes archived thread and freezes #25713
Description
Summary
On Codex Desktop for Windows, archiving the currently open local thread succeeds on the backend, but the Desktop UI immediately keeps trying to resume the same archived thread. This produces a repeated thread/resume / thread/goal/get error loop, a misleading archive failure/error experience, and the app becomes very hard to interact with until it is force-quit/restarted.
This appears related to session/thread resume + archive state handling, but the observed trigger is specifically archiving the active/open conversation from the Desktop UI.
Environment
- Product: Codex Desktop
- Platform: Windows 10 x64 (
10.0.19045observed locally) - Codex Desktop package:
OpenAI.Codex_26.527.7698.0_x64__2p2nqsd0c76g0 - Bundled app-server/client version in logs:
26.527.7698 - Local state/log storage:
%USERPROFILE%\.codex,%LOCALAPPDATA%\Codex\Logs
Symptoms
- User right-clicks / archives the currently open chat.
- The UI reports or appears to report archive failure.
- Codex Desktop becomes sluggish/frozen. Mouse clicks in the app are delayed or ineffective; user has to force close from the Windows taskbar and relaunch.
- After relaunch, the thread is actually archived, so the archive operation itself succeeded.
Local Evidence
Example affected thread, redacted metadata:
thread id: 019e856b-308d-7b73-811e-88d142e5f99a
thread title: <redacted>
cwd: <redacted Windows project path>
state_5.sqlite: archived=1
archived_at: 2026-06-02 07:11:43 local time
Desktop log around the failure:
2026-06-01T23:11:43.507Z info [AppServerConnection] response_routed ... conversationId=019e856b-308d-7b73-811e-88d142e5f99a ... errorCode=null ... method=thread/archive ... targetDestroyed=false
2026-06-01T23:11:43.520Z error [electron-message-handler] Conversation state not found conversationId=019e856b-308d-7b73-811e-88d142e5f99a
2026-06-01T23:11:45.403Z info [AppServerConnection] response_routed ... conversationId=019e856b-308d-7b73-811e-88d142e5f99a ... errorCode=-32600 ... method=thread/resume ... targetDestroyed=false
2026-06-01T23:11:45.411Z error [electron-message-handler] Request failed ... method=thread/resume ... error={"code":-32600,"message":"session 019e856b-308d-7b73-811e-88d142e5f99a is archived. Run `codex unarchive 019e856b-308d-7b73-811e-88d142e5f99a` to unarchive it first."}
2026-06-01T23:11:45.412Z error [electron-message-handler] Failed to resume conversation conversationId=019e856b-308d-7b73-811e-88d142e5f99a errorMessage="session 019e856b-308d-7b73-811e-88d142e5f99a is archived. Run `codex unarchive ...` to unarchive it first."
2026-06-01T23:11:45.427Z info [AppServerConnection] response_routed ... errorCode=-32600 ... method=thread/goal/get ...
2026-06-01T23:11:45.428Z error [electron-message-handler] Request failed ... method=thread/goal/get ... error={"code":-32600,"message":"thread not found: 019e856b-308d-7b73-811e-88d142e5f99a"}
The same sequence repeated every ~2-3 seconds until the user force-quit the app. In one earlier repro on the same machine, a similar archived-thread loop produced roughly:
~85 seconds after archive
164 related events
32 Failed to resume conversation events
64 thread/goal/get attempts
For each affected thread checked locally, thread/archive returned errorCode=null, and state_5.sqlite had archived=1. The failure is after archive, when the renderer/app state continues to route/resume the archived conversation.
Steps to Reproduce
- Open a normal local Codex Desktop thread on Windows.
- While the thread is still the active/open conversation page, archive that same thread from the Desktop UI.
- Observe that the archive request succeeds in logs (
method=thread/archive,errorCode=null). - Immediately after, the app logs
Conversation state not found, then repeatedly issuesthread/resumeandthread/goal/getfor the archived thread. - The UI becomes sluggish/frozen and may show a misleading failure/error state. Force-quitting and relaunching shows the thread is actually archived.
Expected Behavior
After archiving the active/open thread, Desktop should navigate away from that thread or otherwise stop all resume/goal hydration attempts for it. The UI should not repeatedly try to resume a thread that was just archived successfully.
Actual Behavior
Desktop remains bound to the archived thread and repeatedly tries to resume/hydrate it. The backend correctly rejects resume because the session is archived, but the renderer/app state appears to retry until the app is closed.
Notes
This seems adjacent to other session/thread archive-resume issues, but the local repro here is specifically:
- Windows Desktop build
26.527.7698.0 - archive active/open thread
- backend archive succeeds
- UI loops on
thread/resumeandthread/goal/getfor the same archived conversation - app becomes difficult to interact with until restart
I can provide more sanitized log excerpts if useful.
Activity
github-actions commentedon Jun 1, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
FuturiaMarketing commentedon Jun 3, 2026
I am seeing the same active-thread archive/resume behavior on Windows.
Environment:
Observed UI error after archiving the currently open chat:
This matches the diagnosis in this issue: the archive action appears to complete, but the Desktop UI remains bound to the just-archived active conversation and immediately tries to restore/resume the same thread instead of navigating away.
Expected behavior from the user perspective would be one of:
In this case the user workspace/vault is on
D:while Codex app/user state is onC:, but the error is keyed to the archived session id rather than a filesystem path. This looks like a stale activeconversationId/ route state problem, not a C: vs D: path confusion.Current workaround: switch to another chat before archiving the target chat from the sidebar, or restart Codex if the UI gets stuck after archiving the active chat.
mr-ashawa commentedon Jun 4, 2026
Additional confirmation / narrowed repro from my setup:
0.137.0, I can confirm that archiving works without errors if the chat being archived is not the currently active/open chat.Error creating task: session <id> is archived. Run codex unarchive <id> to unarchive it first.After the active-chat archive flow completed with the expected
Failed to resume chaterror for the same archived session, the “Error creating task” symptom disappeared.This suggests that the create-task failure is likely another consequence of stale active conversation state: the UI still routes new task creation through the archived active conversation id until the archive/resume error path partially clears or refreshes that state.
So the narrowed repro seems to be:
session is archivedmessage.Environment note: reproduced on Windows and macOS. Current CLI after update:
codex-cli 0.137.0.szsip239 commentedon Jul 20, 2026
Confirming the same general failure mode on macOS, with an additional duplicate archive-dispatch race.
Environment
26.715.52143 (5591)codex-cli 0.145.0-alpha.1826.5.2 (25F84), Apple Silicon (arm64)4,918,595,444bytes (~4.58 GiB)Observed sequence
Archiving the thread from
recent_tasks_menuproduced three Archive requests in the same millisecond for the same conversation:The first request succeeded:
The other two requests then failed because the first request had already moved the rollout:
Backend/filesystem verification showed that the archive had actually succeeded:
state_5.sqlite:archived=1archived_sessionssessionsarchived_sessionsHowever, the Desktop UI did not consistently show the thread in Archived Threads and continued treating it as loaded. The renderer/app-server kept issuing
thread/turns/listfor that archived thread roughly every 10-15 seconds, with individual calls taking about 9-19 seconds.The Codex app-server also continued to hold both read and writable file descriptors for the rollout after it had moved to
archived_sessions. A native background archive request for the same thread subsequently did not return within 70 seconds.Expected behavior
thread/archiveshould be idempotent.no rollout foundresponses from duplicate requests should not override the successful UI state.Restarting Desktop is currently required to release the loaded rollout before it can be safely moved to cold storage. I am not attaching the rollout because it contains private conversation data, but I can provide additional sanitized log lines if useful.
packye commentedon Jul 29, 2026
Additional Windows reproduction with a different archive failure path.
Environment
26.721.410592026-07-29 11:48 CSTObserved behavior
无法归档对话(Unable to archive conversation).Confirmed local storage layout
%USERPROFILE%\.codex\sessionsonC:(real directory)%USERPROFILE%\.codex\archived_sessions, a junction targetingD:\CodexData\codex\archived_sessionsThis confirms that this particular reproduction is caused by the thread store attempting a cross-volume move through a directory junction. Windows cannot complete the rename/move operation atomically across
C:andD:. It is therefore distinct from the successful-archive/stale-active-route loop originally reported in this issue, although the Desktop UI presents the same generic archive failure message.Expected behavior
sessionsandarchived_sessionsmust be on the same volume.Actual behavior
Local workaround
Keep both
sessionsandarchived_sessionson the same volume. No project source code, account data, or business data is involved in this reproduction.zelingu0920-ctrl commentedon Aug 18, 2026
Additional Windows reproduction that appears to connect this issue with the
\\?\path-normalization problem reported in #26059.Environment
26.814.5167.00.148.0-alpha.15Observed sequence
rollout_pathused the Windows verbatim-path prefix:The referenced file existed and was accessible through the equivalent normalized path without the prefix:
For diagnostic purposes, removing only the
\\?\prefix from this thread's storedrollout_pathmade the built-in archive operation succeed immediately. No conversation content was changed.After the archive succeeded, the Desktop UI attempted to access the archived thread again and displayed:
Backend verification showed that the thread was correctly marked archived and its rollout had moved to
archived_sessions; the error occurred because the UI still requested the archived thread.Additional evidence
\\?\prefix.os error 2to success.thread not foundbehavior matches the stale active-thread state described in this issue.Expected behavior
\\?\should be normalized consistently.This suggests two related failure stages: a thread-store path-normalization failure before archive, followed by the stale active-thread/UI-state failure after archive. Usernames, full local paths, thread titles, conversation content, and thread IDs have been redacted.
zelingu0920-ctrl commentedon Aug 18, 2026
Application feedback has also been submitted for this reproduction.
This feedback session corresponds to the Windows archive/path-normalization reproduction documented in my previous comment.