Codex Desktop on Windows does not show existing local chat history after provider/auth config switches
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.tomlauth.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.sqlitecontains the thread records.D:\SOFTWARE\codex\session_index.jsonlcan be rebuilt fromstate_5.sqlite.
Before manual repair, I observed:
threads.model_providerwas split acrossopenai,OpenAI,sub2api, and an older removed provider.- Real user threads had
has_user_event = 0. guardian/subagentthreads were active and mixed into the samethreadstable.- Some active thread titles were extremely long, up to tens of thousands of characters.
session_index.jsonlonly 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
- Use Codex Desktop on Windows.
- Have multiple local chats across different projects.
- Switch provider/auth by replacing
config.tomlandauth.json. - Reopen Codex Desktop.
- 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_providerthreads.has_user_eventthreads.thread_sourcethreads.sourcethreads.cwdsession_index.jsonl- active
guardian/subagentthreads - very long
threads.title
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗