Archiving active Desktop chat leaves stale active session and stale archived rollout path after unarchive

Resolved 💬 2 comments Opened Jun 3, 2026 by zeropc1106 Closed Aug 6, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

Summary

When archiving the chat that is currently open in the Codex Desktop app, the main window continues to keep that session as the active session and the input box remains interactive. Subsequent attempts to restore/continue the chat or create a task fail because the backend correctly sees the session as archived.

After unarchiving the same chat from the Archived Chats settings page, the app may still try to resolve the rollout from the old archived_sessions path, causing a missing file error.

Steps to reproduce

  1. Open Codex Desktop and select an existing chat in a workspace.
  2. Without switching to another workspace or another chat, archive the currently active chat.
  3. The chat appears to be archived, but the main window remains focused on that same session.
  4. Try to restore/continue the conversation, or type a message and submit it.
  5. Go to Settings, then return to the app.
  6. The window is still focused on the archived session and the same error keeps appearing.
  7. Go to Settings > Archived Chats and unarchive the chat.
  8. Return to the app and open/use the same chat again.

Actual behavior

After archiving the currently active chat, the UI still treats the archived session as active. The input box remains usable and actions such as restoring the conversation or creating a task are still possible from the UI, but they fail with an error like:

session <id> is archived. Run `codex unarchive <id>` to unarchive it first.

After unarchiving the chat from the Archived Chats page, the UI may still reference the old archived rollout path and fail with:

failed to resolve rollout path `<home>/.codex/archived_sessions/rollout-...-<id>.jsonl`: No such file or directory (os error 2)

Expected behavior

After archiving the currently active chat, the app should immediately do one of the following:

  • switch to a new chat,
  • show the archived chat in a read-only archived state,
  • or refresh/clear the active session so the input box and restore/task actions are disabled.

After unarchiving the chat, the app should refresh the session path and no longer reference archived_sessions for that session.

Impact

This leaves Codex Desktop in a broken state: the current chat remains focused and interactive, but restore/continue/task creation fails. Even after unarchiving, the app can continue failing because it still uses the stale archived rollout path.

Notes

This looks like a stale active session / stale rollout path issue after archiving or unarchiving the currently focused chat. It seems easier to reproduce when the user does not switch to another workspace or another chat before archiving.

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 2 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #26159
  • #26174
  • #25769
  • #25713
  • #26012

Powered by Codex Action

0xdevalias · 2 months ago

Possibly relevant: rust-v0.140.0 includes #27276, which changes archive rollout lookup to try the exact rollout filename before falling back to broader file search when the state DB does not have a usable rollout path.

  • #27276

If this stale archived-path case reaches that fallback, current builds may recover faster or more reliably. It likely does not by itself fix Desktop UI/cache state continuing to send an old archived_sessions path, so a retest on 0.140+ would help separate stale-metadata behavior from rollout lookup cost.