codex - 💡(How to fix) Fix Codex Desktop project sidebar shows No chats while local sessions still exist

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Codex Desktop is showing several saved projects with No chats in the project sidebar, even though the corresponding local session files and session_index.jsonl entries still exist on disk.

This appears to be a project-to-thread indexing issue, not actual session data loss.

Root Cause

Codex Desktop is showing several saved projects with No chats in the project sidebar, even though the corresponding local session files and session_index.jsonl entries still exist on disk.

This appears to be a project-to-thread indexing issue, not actual session data loss.

Fix Action

Fix / Workaround

Temporary workaround used locally

This workaround has not been applied yet; it was only used to confirm that the missing associations are recoverable.

Code Example

electron-persisted-atom-state.heartbeat-thread-permissions-by-id[*].sandboxPolicy.writableRoots
electron-saved-workspace-roots
session_index.jsonl
.codex/sessions/**/rollout-*.jsonl session_meta.cwd

---

thread-workspace-root-hints
RAW_BUFFERClick to expand / collapse

Bug Report: Codex Desktop project sidebar shows "No chats" even though local sessions still exist

Summary

Codex Desktop is showing several saved projects with No chats in the project sidebar, even though the corresponding local session files and session_index.jsonl entries still exist on disk.

This appears to be a project-to-thread indexing issue, not actual session data loss.

Environment

  • Product: Codex Desktop
  • Originator from session metadata: Codex Desktop
  • CLI version from session metadata: 0.130.0-alpha.5
  • Source from session metadata: vscode
  • OS: Windows
  • Date observed: 2026-05-15

User-visible behavior

Several projects in the sidebar show No chats, for example:

  • build-and-test-in-pipelines
  • Installer_task
  • formaciones
  • scope wizard

However, local session data still exists under the Codex home directory.

Expected behavior

Saved projects should show their related chats when the underlying session files and session index entries still exist.

If the project/thread hint cache is missing or incomplete, Codex Desktop should rebuild the mapping from durable sources such as:

  • session_index.jsonl
  • session session_meta.cwd
  • persisted thread permissions / writable roots
  • saved workspace roots

The UI should not show No chats for projects that still have recoverable local thread metadata.

Actual behavior

The project sidebar shows No chats for projects that still have local chat/session data.

Local inspection found that:

  • session_index.jsonl still contains the affected thread IDs and names.
  • Session .jsonl files still exist under .codex/sessions.
  • Some older sessions are intentionally under .codex/archived_sessions.
  • .codex-global-state.json contains many thread permissions with valid sandboxPolicy.writableRoots.
  • But top-level thread-workspace-root-hints contains only a very small subset of thread-to-project mappings.

This makes the UI appear as if chats disappeared, while the durable data is still present.

Evidence from local state

Local diagnostic script results:

  • Existing thread-workspace-root-hints: 4
  • Missing candidate project/thread hints recoverable from persisted state: 58
  • Skipped archived sessions: 12
  • Skipped already-associated hints: 3

Candidate recovered groups included:

  • scope wizard: 20 threads
  • Explore and route: 13 threads
  • formaciones: 3 threads
  • additional projects with 1-2 threads each

The global state also had remote-project-connection-backfill-completed: true, so if a backfill/migration is intended to repair this mapping, it may be incorrectly marked complete or may not cover this state shape.

Likely area to investigate

The sidebar grouping appears to depend on top-level thread-workspace-root-hints.

In this case, many thread IDs have enough persisted metadata to infer their project roots from:

electron-persisted-atom-state.heartbeat-thread-permissions-by-id[*].sandboxPolicy.writableRoots
electron-saved-workspace-roots
session_index.jsonl
.codex/sessions/**/rollout-*.jsonl session_meta.cwd

But those thread IDs are absent from:

thread-workspace-root-hints

Impact

This is confusing and potentially risky:

  • Users can believe their chat history has been lost.
  • Existing context becomes hard to discover from the project sidebar.
  • Users may attempt unsafe manual cleanup/reinstall steps despite the sessions still being present.
  • Project continuity is affected for long-running work split across repositories.

Suggested fix

Codex Desktop should make project/thread mapping resilient to missing or stale thread-workspace-root-hints.

Possible fixes:

  • Recompute missing hints at startup from durable session metadata.
  • Treat thread-workspace-root-hints as a cache, not the source of truth.
  • If remote-project-connection-backfill-completed is true but hints are clearly incomplete, rerun a safe incremental backfill.
  • Include archived-session awareness so archived threads are not unintentionally reintroduced into normal project lists.
  • Add a repair/migration path that uses canonical saved workspace roots when a thread writable root points to a Codex-managed worktree.

Temporary workaround used locally

A local dry-run PowerShell script was prepared to reconstruct missing hints from persisted state without modifying anything by default.

The script:

  • Reads .codex-global-state.json.
  • Reads session_index.jsonl.
  • Reads .codex/archived_sessions to avoid reactivating archived threads.
  • Proposes missing thread-workspace-root-hints from heartbeat-thread-permissions-by-id.
  • Resolves Codex worktree roots back to canonical saved workspace roots when possible.
  • Only writes changes when executed with an explicit -Apply flag.
  • Creates a timestamped backup before writing.

This workaround has not been applied yet; it was only used to confirm that the missing associations are recoverable.

Attachments / artifacts available

  • Dry-run report: codex-thread-workspace-hints-report.json
  • Local repair script: Repair-CodexThreadWorkspaceHints.ps1

These can be shared if needed, after reviewing/redacting local paths and thread names.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Saved projects should show their related chats when the underlying session files and session index entries still exist.

If the project/thread hint cache is missing or incomplete, Codex Desktop should rebuild the mapping from durable sources such as:

  • session_index.jsonl
  • session session_meta.cwd
  • persisted thread permissions / writable roots
  • saved workspace roots

The UI should not show No chats for projects that still have recoverable local thread metadata.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING