Skip to content

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

Closed as duplicate

Description

@zeropc1106

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.

Activity

  1. added
    bugSomething isn't working
    appIssues related to the Codex desktop app
    sessionIssues involving session (thread) management, resuming, forking, naming, archiving
    on Jun 3, 2026
  2. 0xdevalias commented on Jun 17, 2026

    @0xdevalias

    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.

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingsessionIssues involving session (thread) management, resuming, forking, naming, archiving

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions