Skip to content

Codex Desktop sidebar project groups only show threads from the first recent page; expanding a project does not load remaining project threads #23825

Closed as duplicate

Description

@laolin5564

Environment

  • Codex Desktop macOS app: 26.513.31313 (2867)
  • Bundled codex: codex-cli 0.131.0-alpha.9
  • macOS: 26.4.1
  • Arch: arm64

Problem

The local sessions were not lost, but the Codex Desktop sidebar only displayed a small subset of threads under each project. Expanding a project did not load the rest of that project's sessions.

This made it look like historical sessions had disappeared, even though they were still present locally and could be returned by the app server with pagination.

Observed behavior

  • Active session data still existed in ~/.codex/state_5.sqlite and ~/.codex/sessions.
  • Direct app-server pagination returned 183 threads across 13 workspace roots.
  • The sidebar initially appeared to show only about 5-6 threads per project.
  • Project "Show more" only expanded already-loaded thread keys; it did not request additional pages.

Expected behavior

When a project is expanded, Codex Desktop should either:

  • load all remaining threads for that project, or
  • continue paginating recent threads until the expanded project has all available sessions, or
  • clearly expose a global load-more mechanism before project-level truncation.

Evidence

  • thread/list with pagination returned pages [100, 83], total 183 unique threads.
  • Workspace counts included:
    • /Users/laolin/Desktop/linyn-kf: 41
    • /Users/laolin/Desktop/linyn-kf-qkl-refactor: 54
    • /Users/laolin/Desktop: 41
    • plus 10 other roots
  • The issue appears related to the desktop sidebar loading only the first recent conversation page, while project expand/collapse operates only on the loaded subset.

Impact

Users may believe historical Codex sessions were lost, even though the session data is still present locally.

Notes

I searched existing issues first. There are related sidebar/thread-list issues, but I did not find one specifically describing project groups being truncated because only the first recent page is loaded and project-level "Show more" does not trigger additional pagination.

Activity

  1. added
    bugSomething isn't working
    appIssues related to the Codex desktop app
    app-serverIssues involving app server protocol or interfaces
    on May 21, 2026
  2. omarpinarecords commented on May 22, 2026

    @omarpinarecords

    just add the environments and select the existing folders. https://developers.openai.com/codex/app/local-environments.

  3. YuchengHE-CHN commented on May 22, 2026

    @YuchengHE-CHN

    Codex Desktop: Local Threads Exist but Project Shows "No chat"

    Summary

    I ran into a case where Codex Desktop showed No chat for a project, even though the old conversations still existed locally. The issue appeared to be a Desktop UI/sidebar/search indexing problem, not data loss.

    Symptoms

    • A project in Codex Desktop showed No chat.
    • Searching for the old thread title or keywords inside Codex Desktop returned no results.
    • The thread still existed in the local SQLite database.
    • The corresponding session JSONL file also still existed under the local Codex sessions directory.

    Local Evidence

    The missing thread was present in the local threads table:

    SELECT id, title, cwd, archived, source, thread_source, updated_at, rollout_path
    FROM threads
    WHERE cwd = '/path/to/project';

    The result showed:

    • archived = 0
    • cwd matched the expected project path
    • rollout_path pointed to an existing session JSONL file
    • source was an older value, such as vscode
    • thread_source was empty for the old thread

    This confirmed that the thread data had not been deleted.

    What Did Not Work

    Simply bumping the thread's updated_at / updated_at_ms fields did not make it appear in Codex Desktop. This suggests the issue was not only caused by the thread being too old or outside the first loaded page of the sidebar.

    What Made It Reappear

    The thread appeared again after combining these steps:

    1. Resume the thread through the CLI:
    codex exec resume <thread-id> "Please reply only OK. Do not edit files or run commands." --skip-git-repo-check
    1. Ensure the thread is marked as a user-visible thread:
    UPDATE threads
    SET thread_source = 'user'
    WHERE id = '<thread-id>';
    1. Ensure the project path is present in the Desktop project order in the global state file:
    {
      "project-order": [
        "/path/to/project"
      ]
    }
    1. Fully quit and reopen Codex Desktop.

    Likely Cause

    The likely cause is an indexing or migration mismatch between older Codex/VS Code-created threads and the newer Codex Desktop project sidebar/search UI.

    In this case, the old thread was valid and unarchived in the local database, but Desktop did not include it in the visible project thread list or search results. The combination of an empty thread_source, older source metadata, missing project ordering state, and the known sidebar pagination/loading behavior made the thread effectively invisible in the Desktop UI.

    Takeaway

    This does not look like data loss. It looks like the Desktop app can fail to surface older local threads in the sidebar/search index, even when they remain recoverable through the local database and CLI.

    For anyone debugging this, check:

    • ~/.codex/state_5.sqlite
    • ~/.codex/sessions/...
    • the threads table
    • archived
    • cwd
    • thread_source
    • rollout_path
    • the Desktop global state project order

    Back up ~/.codex or the relevant SQLite/global-state files before making any manual changes.

  4. TeemoDDD-Bot commented on Sep 14, 2026

    @TeemoDDD-Bot

    Additional reproduction on macOS with ChatGPT/Codex Desktop 26.908.40834 (build 8881). This is still happening in a substantially newer build than the one in the original report.

    Three existing ChatGPT projects currently show 0/1, 1/7, and 0/2 of their active local Codex tasks in the project sidebar. The missing tasks remain searchable and readable. For each affected task I checked, the session file exists, the core database says archived = 0, the historic project assignment is present, and the core database's project_id points to the migrated project. Restarting the desktop app did not restore the project lists.

    The desktop's local thread catalog also contains these tasks with missing_candidate = 0; they are not missing from that index. Among 90 active, top-level local tasks in the catalog, their recency ranks are:

    • Project A: 87 (sidebar shows 0/1)
    • Project B: 10, 26, 52, 71, 83, 85, 86 (sidebar shows 1/7)
    • Project C: 70, 72 (sidebar shows 0/2)

    The visible counts match the tasks in the first small recent page. Expanding the projects does not load the older members. This appears to be a project-sidebar pagination/materialization problem, not deletion or archiving. Please make project expansion load its own task history (or expose a reliable load-more/rebuild action), including tasks beyond the initial global recent page.

  5. etraut-openai commented on Oct 13, 2026

    @etraut-openai
    Contributor

    (response from codex)

    Thanks for measuring the pagination. Closing as a duplicate of #18640, where the same first-global-page limitation hides project threads that the app-server can still return. Your 183-thread/13-root results and the missing load-on-expand behavior are useful for that investigation. The later comment about ChatGPT projects should be checked separately if it involves a different data source. Nothing here suggests the underlying listing issue is fixed.

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 appapp-serverIssues involving app server protocol or interfacesbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions