openai / openai/codex

Full-text search no longer works for local Codex conversations

Open
#44,817 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug session windows-os
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of the Codex App are you using (From “About Codex” dialog)?

Version 26.903.71938

What subscription do you have?

ChatGPT Plus

What platform is your computer?

windows 11

What issue are you seeing?
Summary

On Codex Desktop for Windows, conversation search appears to search thread titles/metadata but no longer searches the actual contents of local conversations.

Full-text search did work previously on this installation, but I cannot determine exactly which update introduced the regression.

Environment
  • Windows
  • Codex / ChatGPT Desktop version: 26.903.71938
  • Local Codex storage under %USERPROFILE%\.codex
  • History mode: paginated
Reproduction
  1. Open an existing local Codex project conversation.

  2. Add a unique string to the conversation, for example:

    BERTRANDTEST92837

  3. Search for the exact string using the Desktop app search.

Result: no result is returned.

  1. Search for the thread title.

Result: the thread is found.

Local data verification

The affected thread ID is:

01a0332f-0ea9-73d3-8818-0c644dabf644

The unique test string is present in the canonical rollout JSONL:

~\.codex\sessions\2026\08\24\rollout-2026-08-24T11-51-57-01a0332f-0ea9-73d3-8818-0c644dabf644.jsonl

It is also present in:

~\.codex\thread_history_1.sqlite

Query:

SELECT thread_id, turn_id, item_id, item_type, item_json
FROM thread_items
WHERE item_json LIKE '%BERTRANDTEST92837%';

This returns both the user message and assistant response containing the string.

PRAGMA integrity_check returns ok for both:

  • state_5.sqlite
  • thread_history_1.sqlite

The same thread is also present in state_5.sqlite.

Additional observations

thread_history_1.sqlite contains the full conversation content in thread_items.item_json.

There is no SQLite FTS index on the message text. Existing indexes cover thread IDs, turn IDs, rollout ordinals and pagination.

The Desktop search currently finds the thread title, but does not find:

  • text from the first user message
  • text from later messages
  • a newly-added unique test string

This suggests the current Desktop search is querying thread metadata but is no longer performing full-text search over projected local conversation content.

Expected behavior

Searching for text contained in a local Codex conversation should return the corresponding thread, as it did previously.

Requested fix

Please restore full-text search for local Codex conversations, or provide a supported local reindex/rebuild command if the search projection requires rebuilding.

What steps can reproduce the bug?
  1. Open Codex / ChatGPT Desktop on Windows.

  2. Open an existing local project conversation.

  3. Add a unique test string to the conversation, for example:

    BERTRANDTEST92837

  4. Use the Desktop app search and search for that exact string.

  5. Observe that no result is returned.

  6. Search for the conversation title instead.

  7. Observe that the thread is found by title.

  8. Optionally verify locally that the test string is present in both:

    • the corresponding rollout-*.jsonl
    • thread_history_1.sqlite in thread_items.item_json

The issue is reproducible consistently on version 26.903.71938.

What is the expected behavior?

Searching for text contained anywhere in a local Codex conversation should return the corresponding thread in the Desktop app search results.

This should include text from the first user message as well as text from later messages in the conversation, not only the thread title or metadata.

Additional information

The local conversation data appears intact.

For the affected thread:

  • state_5.sqlite passes PRAGMA integrity_check with ok.
  • thread_history_1.sqlite also passes PRAGMA integrity_check with ok.
  • The affected thread exists in state_5.sqlite.
  • The unique test string is present in the corresponding rollout-*.jsonl.
  • The same string is also present in thread_history_1.sqlite, inside thread_items.item_json.
  • The thread contains hundreds of projected items, so the local history is not missing.
  • Searching by the conversation title works.
  • Searching for text inside the conversation does not work.

thread_history_1.sqlite does not contain a SQLite FTS index for message text. The existing indexes are related to thread IDs, turn IDs, rollout ordinals and pagination.

This suggests the issue is likely in the Desktop application's full-text search logic rather than missing or corrupted local conversation data.

The issue occurs on Windows with Codex / ChatGPT Desktop version 26.903.71938.

Full-text conversation search worked previously on this installation, but I cannot determine which update introduced the regression.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the missing-content search in the Codex Desktop app on Windows 11, then inspect the local data under %USERPROFILE%.codex, including thread_history_1.sqlite and state_5.sqlite. Confirm that searches cover message text in thread_items.item_json as well as titles, and that the reported conversation and unique test string are returned.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, sqlite
Domain
databases, desktop, search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.