codex - 💡(How to fix) Fix VS Code Codex history intermittently hides existing local chats [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#21244Fetched 2026-05-06 06:24:18
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1
RAW_BUFFERClick to expand / collapse

What version of the IDE extension are you using?

VS Code 1.118.1, arm64

What subscription do you have?

Enterprise

Which IDE are you using?

VS Code

What platform is your computer?

Darwin 24.6.0 arm64 arm

What issue are you seeing?

The VS Code Codex history/task list intermittently fails to show chats that still exist in the local Codex history store.

The affected chats are still present in the local SQLite state database and have corresponding rollout JSONL transcript files. In at least one case, the chat was also present in session_index.jsonl. Opening the chat by local thread id can recover it, so this appears to be a VS Code history listing/search/indexing issue rather than data loss.

Local data was not lost. The chat existed in:

  • ~/.codex/state_5.sqlite
  • ~/.codex/sessions/.../rollout-*.jsonl
  • ~/.codex/session_index.jsonl

Actual behavior:

  • Some chats that exist locally are absent from the VS Code history UI.
  • Search/list behavior appears to use a cached or partial thread list.

What steps can reproduce the bug?

The issue is intermittent. I create, switch, and resume several conversations per day. I do not currently have a deterministic minimal reproduction, but this has happened a couple of times:

  1. Use Codex in VS Code across many chats in the same workspace.
  2. Later try to find an older chat from the VS Code Codex history/task list.
  3. The chat is missing from the VS Code history UI.
  4. Inspect the local Codex history storage.
  5. Confirm that the missing chat still exists in state_5.sqlite.
  6. Confirm that the corresponding rollout JSONL transcript file still exists.
  7. Optionally confirm whether the chat is also present in session_index.jsonl.
  8. Open the chat directly by local thread id and confirm it is recoverable.

What is the expected behavior?

If a Codex chat exists in the local SQLite state database, is not archived, belongs to the VS Code source, matches the current workspace, and has a valid rollout JSONL transcript file, it should appear in the VS Code Codex history/task list and be searchable/recoverable from the UI.

The history UI should not depend on a stale or partial recent-chat cache if the authoritative local state still contains matching chats.

Additional information

Environment:

  • macOS 15.7.5, build 24G624
  • VS Code 1.118.1, arm64
  • OpenAI ChatGPT / Codex VS Code extension: [email protected]
  • codex-cli 0.128.0

Local DB counts at the time:

  • vscode active: 174
  • vscode archived: 8
  • cli active: 2
  • cli archived: 4
  • exec active: 8

The issue seems to involve inconsistency between the authoritative local history data and what the VS Code Codex history UI lists or searches.

extent analysis

TL;DR

The VS Code Codex history/task list issue may be resolved by ensuring that the local Codex history storage is properly indexed and cached.

Guidance

  • Verify that the session_index.jsonl file is up-to-date and contains the missing chat, as this file seems to be used for indexing and searching.
  • Check the Codex extension settings to see if there are any caching or indexing options that can be adjusted to improve the accuracy of the history list.
  • Try opening the chat directly by local thread id to confirm that it is recoverable, and then check if it appears in the history list after doing so.
  • Consider checking the extension's documentation or issues page to see if there are any known issues or workarounds related to history listing and searching.

Notes

The issue seems to be related to the inconsistency between the local history data and the VS Code Codex history UI, but the exact cause is unclear. The provided information suggests that the issue is intermittent and may be related to caching or indexing.

Recommendation

Apply workaround: Try adjusting the Codex extension settings or checking for updates to the extension, as the issue may be related to a known bug or limitation.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix VS Code Codex history intermittently hides existing local chats [1 comments, 2 participants]