What version of the Codex App are you using (From “About Codex” dialog)?
26.429.30905
What subscription do you have?
Pro
What platform is your computer?
Darwin 25.4.0 arm64 arm
What issue are you seeing?
Codex Desktop appears to show a stale or incorrectly filtered conversation sidebar after recent CLI/extension/app history imports. Recent conversations exist in the local Codex state database and are returned by the app-server thread/list API, but the Desktop UI does not show them. Manual repairs to global/sidebar state are overwritten on app startup.
The issue appears related to the Desktop "Imported agent setup" flow. I clicked the "Import again" button multiple times. The visible badge count decreased from 16 to 0, and the card reported "Last imported 16h ago", but the sidebar remained stale after repeated imports and after restarting the app.
Impact: I experience this as lost conversation history. Multiple recent project conversations are missing from the visible sidebar, especially recent Mother OS and BlueChimp work. The sidebar appears to show conversations up to roughly 14-16 hours ago, then jumps to much older history, despite the database containing many conversations in between.
Environment:
- Product: Codex Desktop app on macOS
- Platform: Darwin 25.4.0 arm64 arm
- Observed app version from process metadata:
26.429.30905
- Electron version from process metadata:
41.2.0
- Local Codex state database:
~/.codex/state_5.sqlite
- Global UI state file:
~/.codex/.codex-global-state.json
- Global UI state backup file:
~/.codex/.codex-global-state.json.bak
Evidence:
- Local DB contains the missing recent conversations with
archived = 0.
- A direct app-server
thread/list request with limit: 30, sortKey: "updated_at", sortDirection: "desc", archived: false, and useStateDbOnly: true returned the expected recent list, including the missing Mother OS and BlueChimp conversations.
- This suggests the database and app-server listing path are correct, while the Desktop sidebar display/state path is stale or filtered incorrectly.
Current hypothesis:
Codex Desktop startup or sidebar state reconciliation is restoring stale selected-remote-host-id and active-workspace-roots from app memory, migration logic, or another source of truth even after both global state files are repaired. This stale active project/remote state appears to affect the visible conversation list, while the underlying DB and app-server recent conversation API remain correct.
What steps can reproduce the bug?
- Click the Desktop "Imported agent setup" / "Import again" action multiple times.
- Observe the import badge count decrease from
16 to 0, suggesting the importer believes it processed the pending items.
- Restart Codex Desktop.
- Observe that the sidebar still shows stale history with recent conversations missing.
- Inspect
~/.codex/state_5.sqlite and confirm the missing threads exist and are not archived.
- Run
PRAGMA integrity_check; it returns ok.
- Query app-server
thread/list with state DB only and confirm the missing conversations are returned.
- Inspect global UI state and observe stale state similar to:
{
"selected-remote-host-id": "[redacted remote host id]",
"active-workspace-roots": ["[redacted stale workspace root]"],
"electron-persisted-atom-state": {
"sidebar-workspace-filter-v2": "all",
"sidebar-organize-mode-v1": "recent",
"sidebar-keep-projects-in-recent-v1": false
}
}
- Edit
~/.codex/.codex-global-state.json while Codex is running; the app overwrites the edit.
- Fully quit Codex and repair both
~/.codex/.codex-global-state.json and ~/.codex/.codex-global-state.json.bak to clear selected-remote-host-id and active-workspace-roots.
- Reopen Codex.
- Observe that Codex rewrites
selected-remote-host-id and active-workspace-roots back to stale values on startup, and the sidebar remains wrong.
What is the expected behavior?
The Desktop sidebar Recent view should show all unarchived recent conversations sorted by updated_at, including recent conversations across projects such as Mother OS and BlueChimp.
Repeated use of "Imported agent setup" / "Import again" should not cause visible conversation history to disappear, become stale, or be filtered by an old project/remote workspace state.
If local thread/session data exists in ~/.codex/state_5.sqlite and is returned by app-server thread/list, the Desktop sidebar should surface it correctly.
Additional information
Possible areas to inspect:
- Startup reconciliation of
selected-remote-host-id
- Startup reconciliation of
active-workspace-roots
- Interaction between Recent sidebar mode and active workspace/project selection
- Import/reindex behavior behind the "Imported agent setup" / "Import again" flow, especially repeated imports where the pending badge count decreases to zero but sidebar state remains stale
- Any fallback/restore behavior involving
.codex-global-state.json.bak
- Remote project migration logic that may select the first saved workspace root when active roots are empty
Related public reports:
This is high impact because the user perceives recent local work as lost, even though the underlying history is present. The app should either avoid applying stale workspace filters to Recent history, or surface/clear the active filter clearly, and should not silently overwrite repaired state with stale project/remote selection on startup.
What version of the Codex App are you using (From “About Codex” dialog)?
26.429.30905
What subscription do you have?
Pro
What platform is your computer?
Darwin 25.4.0 arm64 arm
What issue are you seeing?
Codex Desktop appears to show a stale or incorrectly filtered conversation sidebar after recent CLI/extension/app history imports. Recent conversations exist in the local Codex state database and are returned by the app-server
thread/listAPI, but the Desktop UI does not show them. Manual repairs to global/sidebar state are overwritten on app startup.The issue appears related to the Desktop "Imported agent setup" flow. I clicked the "Import again" button multiple times. The visible badge count decreased from
16to0, and the card reported "Last imported 16h ago", but the sidebar remained stale after repeated imports and after restarting the app.Impact: I experience this as lost conversation history. Multiple recent project conversations are missing from the visible sidebar, especially recent Mother OS and BlueChimp work. The sidebar appears to show conversations up to roughly 14-16 hours ago, then jumps to much older history, despite the database containing many conversations in between.
Environment:
26.429.3090541.2.0~/.codex/state_5.sqlite~/.codex/.codex-global-state.json~/.codex/.codex-global-state.json.bakEvidence:
archived = 0.thread/listrequest withlimit: 30,sortKey: "updated_at",sortDirection: "desc",archived: false, anduseStateDbOnly: truereturned the expected recent list, including the missing Mother OS and BlueChimp conversations.Current hypothesis:
Codex Desktop startup or sidebar state reconciliation is restoring stale
selected-remote-host-idandactive-workspace-rootsfrom app memory, migration logic, or another source of truth even after both global state files are repaired. This stale active project/remote state appears to affect the visible conversation list, while the underlying DB and app-server recent conversation API remain correct.What steps can reproduce the bug?
16to0, suggesting the importer believes it processed the pending items.~/.codex/state_5.sqliteand confirm the missing threads exist and are not archived.PRAGMA integrity_check; it returnsok.thread/listwith state DB only and confirm the missing conversations are returned.{ "selected-remote-host-id": "[redacted remote host id]", "active-workspace-roots": ["[redacted stale workspace root]"], "electron-persisted-atom-state": { "sidebar-workspace-filter-v2": "all", "sidebar-organize-mode-v1": "recent", "sidebar-keep-projects-in-recent-v1": false } }~/.codex/.codex-global-state.jsonwhile Codex is running; the app overwrites the edit.~/.codex/.codex-global-state.jsonand~/.codex/.codex-global-state.json.bakto clearselected-remote-host-idandactive-workspace-roots.selected-remote-host-idandactive-workspace-rootsback to stale values on startup, and the sidebar remains wrong.What is the expected behavior?
The Desktop sidebar Recent view should show all unarchived recent conversations sorted by
updated_at, including recent conversations across projects such as Mother OS and BlueChimp.Repeated use of "Imported agent setup" / "Import again" should not cause visible conversation history to disappear, become stale, or be filtered by an old project/remote workspace state.
If local thread/session data exists in
~/.codex/state_5.sqliteand is returned by app-serverthread/list, the Desktop sidebar should surface it correctly.Additional information
Possible areas to inspect:
selected-remote-host-idactive-workspace-roots.codex-global-state.json.bakRelated public reports:
statussessions flood recent local history #18364 - Mac app hides older local conversations after update because bogus root-levelstatussessions flood recent local history. Very relevant because it mentionsstate_5.sqlite, local data not deleted, recent local history being displaced, and DB-only repairs not surviving relaunch.RECENT_CONVERSATIONS_PAGE_SIZE = 50and suggests auto-pagination/load-more.codexCloudAccess=disabled#10547 - Desktop app stuck in cloud-only mode; local sessions ignored even withcodexCloudAccess=disabled. Older closed issue involving Desktop ignoring local sessions and persistedactive-workspace-roots.This is high impact because the user perceives recent local work as lost, even though the underlying history is present. The app should either avoid applying stale workspace filters to Recent history, or surface/clear the active filter clearly, and should not silently overwrite repaired state with stale project/remote selection on startup.