Codex Desktop sidebar loses chat history when thread titles contain large transcript chunks

Open 💬 4 comments Opened May 5, 2026 by ywkuno

What is the issue?

Codex Desktop suddenly stopped showing most chat history in the left sidebar. The chats are still recoverable through Search, and pinning a searched chat makes it appear again, so this does not appear to be data loss. It looks like the sidebar thread list rendering/query path fails or drops most items while search still indexes them.

Environment

  • OS: Windows
  • Codex Desktop package: OpenAI.Codex
  • Codex Desktop version: 26.429.3425.0
  • Store package family: OpenAI.Codex_2p2nqsd0c76g0

Observed behavior

  • Sidebar Chats section only shows one recent thread.
  • Existing chats are still discoverable via Search.
  • Pinning a found chat restores it under Pinned.
  • SQLite integrity check passes and session files are still present.

Local diagnostics

The local thread store appears healthy:

DB: %USERPROFILE%\.codex\state_5.sqlite
PRAGMA integrity_check: ok
threads total: 125
active threads: 110
archived threads: 15
session JSONL files on disk: 121

However, many threads.title and threads.first_user_message values are extremely large. These look like transcript chunks rather than sidebar-safe titles.

active threads where length(title) > 200: 62
active threads where length(title) > 1000: 56
active threads where length(title) > 10000: 21
max length(title): 79452
avg length(title): 8732.992

Example shape, redacted:

id: <thread-id>
title_len: 79452
title_preview: "<normal user opening text> [165] user: # In app browser: ..."

The global state still has pinned thread IDs in %USERPROFILE%\.codex\.codex-global-state.json under electron-persisted-atom-state.pinned-thread-ids.

Relevant logs

Startup logs show thread/list returning successfully, which matches search/history still existing:

method=thread/list ... errorCode=null ... durationMs=186

There are also slow startup/config/plugin calls around ~60 seconds and many Git probe warnings, but the key sidebar-specific clue seems to be the huge thread metadata.

Hypothesis

threads.title / first_user_message can become populated with large transcript/browser/comment/approval-history payloads. The search path can still find threads, but the sidebar list renderer or thread/list consumer appears to fail, truncate incorrectly, or silently omit most rows when many active threads have very large titles.

Workaround

Closing Codex, backing up %USERPROFILE%\.codex\state_5.sqlite*, then truncating oversized threads.title / first_user_message metadata should restore sidebar list behavior without deleting session JSONL history.

I have not attached raw DB rows because they include private chat/project contents.

Expected behavior

The sidebar should continue listing active chats even if title generation or first-message metadata becomes very large. Ideally titles should be capped/sanitized before persistence, and thread/list/sidebar rendering should defensively truncate display fields.

View original on GitHub ↗

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