Codex Desktop: archived local thread disappears from both active and Archived lists; unarchive fails with missing hostId

Open 💬 2 comments Opened Jun 9, 2026 by Audacity88

What version of the Codex App are you using (From "About Codex" dialog)?

26.602.71036

What subscription do you have?

ChatGPT Pro

What platform is your computer?

Darwin 23.6.0 arm64 arm

What issue are you seeing?

Archiving a local Codex Desktop thread can hide it from both the normal thread list and the Archived list. The thread record and transcript still exist, and the thread can still be read by exact thread id, but the UI no longer surfaces it.

I also saw a related unarchive UI state problem: when unarchiving another archived chat, the unarchive actually succeeded, but the Archived page stayed stuck with a toast reading Unarchiving chat... and disabled Unarchive buttons. So the backend state and the Archived UI can drift in both directions.

Observed failure mode:

  • user clicks Archive on a local desktop thread;
  • the thread disappears from the active/sidebar list;
  • the same thread does not appear in Archived search/list;
  • direct lookup by exact thread id still works;
  • attempting to unarchive through the app thread API fails with:
set_thread_archived requires hostId for unloaded thread <thread_id>

Concrete local evidence from one affected thread:

thread id: 019ea801-c5a4-70f2-a825-20f3f52d210f
title: Quill (docs)
read_thread by id: succeeds
list_threads(query="Quill"): returned no threads while archived
threads.archived in ~/.codex/state_5.sqlite: 1
threads.rollout_path: ~/.codex/archived_sessions/rollout-2026-06-09T00-12-29-019ea801-c5a4-70f2-a825-20f3f52d210f.jsonl
unarchive attempt: requires hostId for unloaded thread 019ea801-c5a4-70f2-a825-20f3f52d210f

Manual recovery required backing up local state, copying the rollout JSONL back under ~/.codex/sessions/2026/06/09/..., and updating only that thread row to archived = 0, archived_at = NULL, the active rollout_path, and thread_source = 'user'. After that, list_threads(query="Quill") found the thread again.

This looks like a Codex Desktop indexing/host metadata bug: Archive can produce an archived, unloaded local thread that has enough persisted state to be read by id, but lacks the host/index metadata needed to appear in Archived or be unarchived normally.

What steps can reproduce the bug?

I do not yet have a minimal clean-profile repro, but this happened repeatedly on a real macOS profile with pinned local threads.

Observed sequence:

  1. In Codex Desktop, open a local saved workspace with a pinned local thread.
  2. Use the UI Archive button on that thread.
  3. Search for the thread title in the active/current list.
  4. Search for the same title in Archived.
  5. Attempt to unarchive the thread by id through the app thread API.

Actual result:

  • active/current search returns nothing;
  • Archived search returns nothing;
  • direct read by exact thread id succeeds;
  • unarchive by id fails with requires hostId for unloaded thread;
  • SQLite shows threads.archived = 1 and a rollout path under ~/.codex/archived_sessions.

Related observed UI state:

  1. Open Archived chats.
  2. Click Unarchive on an archived chat that is visible in the Archived list.
  3. The unarchive succeeds, but the page remains stuck showing Unarchiving chat... and the row buttons remain disabled.

What is the expected behavior?

Archiving should make the thread visible in the Archived list, and Unarchive should work for any archived local thread that still has readable local state.

More specifically:

  • Archived local threads should remain discoverable in Archived search/list.
  • The app should not require unavailable hostId metadata to unarchive a local unloaded thread.
  • If a thread can be loaded/read by exact id, the app should be able to materialize enough metadata to show it in Archived and unarchive it.
  • The active/current list and Archived list should not both omit the same existing thread.
  • After a successful unarchive, the Archived page should clear the pending toast/button state and refresh the list.

Additional information

Related issues I found before filing: #20317, #25769, #23979, #22592, #20608, and #11907. This may be in the same bug cluster, but I did not find an exact match for the requires hostId for unloaded thread failure.

No raw rollout files, logs, auth files, or full state databases are attached because they can contain private prompts, local project names, and account metadata. I can provide redacted SQL output or specific metadata fields if maintainers say what is useful.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗