Codex Desktop on Windows does not show existing local chat history after provider/auth config switches

Open 💬 2 comments Opened Jun 7, 2026 by LinX-Wang

Title:
Codex Desktop on Windows does not show existing local chat history after provider/auth config switches

Summary

Codex Desktop on Windows does not show most existing chat history in the sidebar/project list, even though the local session files and state_5.sqlite records still exist.

This appears similar to other reports where sessions exist locally but are missing from the Desktop UI.

Environment

  • OS: Windows
  • Codex Desktop version: 26.602.40724
  • Codex home: D:\SOFTWARE\codex
  • Provider/auth setup:
  • Official OpenAI direct
  • local Sub2API
  • GMN relay
  • Switching is done by replacing:
  • config.toml
  • auth.json

What happened

After switching between provider/auth modes and reopening Codex Desktop, old chats from other modes do not appear in the sidebar/project list.

Switching back sometimes makes some history appear again, but the history is not consistently visible across modes.

What I checked

The underlying local data is still present:

  • D:\SOFTWARE\codex\sessions\... contains many rollout JSONL files.
  • D:\SOFTWARE\codex\state_5.sqlite contains the thread records.
  • D:\SOFTWARE\codex\session_index.jsonl can be rebuilt from state_5.sqlite.

Before manual repair, I observed:

  • threads.model_provider was split across openai, OpenAI, sub2api, and an older removed provider.
  • Real user threads had has_user_event = 0.
  • guardian/subagent threads were active and mixed into the same threads table.
  • Some active thread titles were extremely long, up to tens of thousands of characters.
  • session_index.jsonl only contained a small subset of the real user threads.

After manual repair, the data layer looked cleaner:

visible user threads: 40
active subagent threads: 0
session_index.jsonl user threads: 40
model_provider unified to current provider
cwd paths normalized from \\?\D:\... to D:\...
long active titles shortened

But Codex Desktop still does not reliably show all historical chats in the sidebar/project list.

Expected behavior

If local sessions and thread records exist, Codex Desktop should show all valid user threads, regardless of provider/auth config changes, or provide a safe built-in "repair/reindex local history" command.

Actual behavior

Only a small subset of historical chats appears in the sidebar/project list. Some projects show only one recent thread even when state_5.sqlite contains multiple user threads for that project.

Reproduction pattern

  1. Use Codex Desktop on Windows.
  2. Have multiple local chats across different projects.
  3. Switch provider/auth by replacing config.toml and auth.json.
  4. Reopen Codex Desktop.
  5. Observe that many old chats no longer appear, even though session JSONL files and SQLite records still exist.

Notes

Please do not treat this as data deletion. The data appears to remain on disk. The issue seems to be local history indexing/filtering in Codex Desktop.

Potential contributing fields:

  • threads.model_provider
  • threads.has_user_event
  • threads.thread_source
  • threads.source
  • threads.cwd
  • session_index.jsonl
  • active guardian/subagent threads
  • very long threads.title

View original on GitHub ↗

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