Skip to content

Codex macOS app project sidebar can hide existing local project chats after restart/cache drift while SQLite thread records remain intact #25574

Open

Description

@someshds

Summary

The Codex macOS app sidebar/project view showed several saved projects as having no chats or missing chats, even though the local Codex SQLite state still contained active, non-archived thread rows for those project roots.

The issue appeared around 2026-05-30/31 and persisted after a normal app restart. A local UI cache reset restored some project visibility, but additional drift remained between:

  • saved workspace roots in .codex-global-state.json;
  • thread cwd roots in state_5.sqlite;
  • what the app sidebar/search showed under projects.

No message/thread data appeared to be deleted. The problem looked like project sidebar/index visibility drift.

Environment

  • App: Codex Desktop for macOS
  • Version: 26.527.31326
  • Build: 3390
  • macOS: iMac local install
  • Local Codex state files involved:
    • ~/.codex/.codex-global-state.json
    • ~/.codex/state_5.sqlite

Observed Behavior

  1. Several project folders in the Codex sidebar showed No chats or omitted known project chats.
  2. Affected chats were still present in local SQLite:
    • threads.cwd matched the expected project root;
    • archived = 0;
    • titles/previews/timestamps were intact.
  3. Some projects became visible again after a local UI cache reset.
  4. Other threads were still only discoverable via local thread inventory, not reliably via saved project/sidebar grouping.
  5. Creating visible recovery anchor threads helped the sidebar show certain projects again, which suggests an index/display-layer issue rather than missing data.

Expected Behavior

If a saved workspace/project root has active, non-archived local threads whose cwd is that root, the sidebar/project view should reliably show those chats after restart.

If a root has local active threads but is not currently a saved project root, the app should either:

  • show the root in a recoverable/local roots section;
  • offer to re-add it as a project;
  • or surface a clear warning rather than making the sessions look missing.

Evidence From Local Audit

Local read-only audit found:

  • 17 saved project roots.
  • 24 local roots with Codex thread records.
  • 199 active local threads.
  • 109 archived local threads.
  • 7 active local roots were not saved project roots.

Examples of unsaved local roots with active threads:

  • ~/Claude/codex/projects
  • ~/Claude/analytics
  • ~/Claude/upwork-bid-tracker
  • ~/Documents/Calendar Admin
  • several historical ~/Documents/Codex/... roots

Examples of saved project roots where recovery anchors were needed or visibility was inconsistent:

  • Happy Wood Stoves
  • LinkedIn Outreach
  • Instantly
  • BoxLeague Pro
  • Calendar Admin
  • RippleKeep

Recovery Steps Tried

  1. Normal Codex restart: did not fully resolve.
  2. Local state backup created.
  3. UI/sidebar cache reset: restored several project folders/chats.
  4. Recovery anchor threads created under affected project roots to force visible project entries.
  5. Built a read-only local monitor comparing saved project roots against threads.cwd roots to detect future drift.

Impact

The issue makes it look like project chats have disappeared, even though the data is still present locally. This creates a high-risk UX failure for users managing many project-scoped Codex sessions, because they may assume important work has been lost.

Suggested Fix / Product Behavior

Potential improvements:

  1. On startup, reconcile saved workspace roots with local threads.cwd roots.
  2. Surface active local roots that are not saved project roots.
  3. Add a “recover project chats” or “show local roots with sessions” option.
  4. Add a sidebar/index repair command that does not require manual SQLite/cache inspection.
  5. Avoid showing No chats for a saved root when active local thread rows exist for that cwd.

Privacy Note

This report is sanitized. Full local logs/state can be provided privately if requested, but should not be posted publicly because paths and thread titles may contain private business context.


Submitted from a sanitized local incident report with user approval.

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 1, 2026
  2. huangweikkun commented on Jun 1, 2026

    @huangweikkun

    I can reproduce a closely related Projects sidebar visibility issue on macOS.

    Environment

    • Codex Desktop: 26.527.31326
    • Bundle build: 3390
    • macOS: 26.5 / build 25F71
    • Date observed: 2026-06-01

    Observed behavior

    A saved project appears in the left sidebar under Projects, but it shows No chats even after creating and sending new chats from that project context.

    The new chats are visible under the general Chats section, but the project itself continues to show No chats.

    Restarting Codex and refreshing/reloading the window did not fix it.

    Expected behavior

    If a chat is created with a selected saved project/workspace root, and its thread row has cwd equal to that project root, it should appear under that project in the sidebar.

    Local evidence from read-only audit

    The affected workspace root is a saved project root. In local state:

    • ~/.codex/.codex-global-state.json contains the workspace root in:
      • electron-saved-workspace-roots
      • project-order
      • active-workspace-roots
    • ~/.codex/state_5.sqlite has active, non-archived threads for the same cwd.
    • Querying local SQLite showed 8 non-archived thread rows where threads.cwd equals that project root.
    • Two freshly created test threads had titles like 查找当前目录 and cwd equal to the saved project root.
    • Despite that, the Projects sidebar still showed No chats for the project.

    This looks like a project/sidebar indexing or rendering issue rather than missing thread data. It also affects newly created project-context chats, not only older historical chats.

    Privacy note

    I have omitted exact local paths and screenshots from this public comment. Screenshots and sanitized state snippets can be provided privately if useful.

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