openai / openai/codex

Codex History Indexing and Side Chat Failure

Open
#44,520 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app app-server bug
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

Account: aprilliucs

Environment

  • OS: macOS.
  • Application: /Applications/ChatGPT.app, bundle ID com.openai.codex.
  • Application version: 26.903.71938, build 8576; bundled app-server version: 0.153.4.
  • Task: Integrate code optimization example.
  • Task ID: 01a061a4-423f-7ff2-bece-4e389e57ed63.
  • Affected history segment: 01a08a07-4298-7fb2-9ec8-e19a1ae275bb.

Symptoms and Direct Evidence

  1. The history retrieval API returns empty items for some completed turns. The latest turn returned is the test run that began at 16:41 on September 10, 2026, Singapore time; subsequent completed messages are not returned correctly.
  2. The raw session segments still contain the continued testing, deployment, memory-related explanations, and MR creation responses from 17:59 onward.
  3. Creating a side chat fails. The thread/fork failure persists after restarting the application.

Exact error:

method=thread/fork errorCode=-32603
failed to prepare paginated fork: thread-store internal error:
thread history projection for 01a08a07-4298-7fb2-9ec8-e19a1ae275bb
expected ordinal 49397, got 49396

Timeline (Singapore Time, UTC+8)

Time | Evidence -- | -- 2026-09-10 18:08:09 | failed to project durable rollout, with the same ordinal mismatch error 2026-09-10 20:25:01 / 20:25:05 / 20:25:09 | Error opening side chat, corresponding to thread/fork failures 2026-09-10 20:27:41 | Logs from the new application process begin 2026-09-10 20:30:33 | The new process reports Error forking local task, with the same ordinal error

Local Log Locations

  • ~/Library/Logs/com.openai.codex/2026/09/10/codex-desktop-770a787b-d79a-4613-9caf-3098401e79ae-7253-t0-i1-095807-0.log: history projection error around line 943; side chat failure around line 3361.
  • ~/Library/Logs/com.openai.codex/2026/09/10/codex-desktop-ac6293b1-8e3b-4a73-8d07-64c865a35a29-46951-t0-i1-122741-0.log: failure persists after restart, around line 483.

Read-Only Verification

  • The affected thread is not archived.
  • All 15 raw JSONL segments for this task are readable and parseable.
  • The affected segment’s projection state records byte offset 39505864 and ordinal 49397.
  • This byte offset falls exactly at the start of the thread_settings_applied record for the new turn at 17:59:22.
  • The internal write or replay mechanism that triggered the mismatch has not been confirmed. No hypothesis has been treated as the root cause.

Recovery Measures Taken

Visible user messages, assistant responses, and locally available attachments were extracted through read-only access to create independent copies and a source verification manifest. During this recovery process, no Codex databases, raw session files, or configuration files were modified or deleted; the application was not restarted; and no chat content was publicly uploaded.

Requested Support

Please investigate the ordinal consistency issue affecting segmented history projection for long conversations in this version, and provide a supported method to rebuild or repair the index for this task alone. The goal is to restore history display in the original window and thread/fork functionality without losing raw messages or affecting other tasks.

This report contains no conversation content or credentials. Before formally submitting it, please verify that the environment details are appropriate to share. Do not directly attach complete logs, raw session files, or private project conversations.

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 with the history projection error around line 943 in ~/Library/Logs/com.openai.codex/2026/09/10/codex-desktop-770a787b-d79a-4613-9caf-3098401e79ae-7253-t0-i1-095807-0.log and the side-chat failure around line 3361. Compare these with the post-restart failure around line 483 in the second log, focusing on the expected ordinal 49397 versus 49396. Done means restoring this task's history display and thread/fork behavior without modifying raw messages or affecting other tasks.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.