Exact error
Match the message before using the fix
thread-store internal error: thread history projection ... expected ordinal 192591, got 192590 (code -32603)failed to prepare paginated forkFailed to start side conversation: thread/fork failed during TUI bootstrapQuick answer
Start here
Copy the intended side-message before retrying. Stop using `/btw` or fork on the affected thread: one report shows the payload can fall through into the active main turn after the fork fails. Continue urgent work in a fresh thread and preserve the damaged thread for diagnosis. Do not edit SQLite projection cursors or delete rollout files; no supported repair is confirmed.
Diagnosis
Why it happens
- The exact error shows the live writer and stored projection disagree by an ordinal in a paginated thread.
- The source report passed database-integrity and rollout/state-parity checks, so a generic database corruption check may not detect this logical mismatch.
- In one failure-containment report, the failed `/btw` payload was delivered to the main active turn instead of remaining isolated.
Safest first
Fixes, in order
Protect the active thread from misrouted input
Applies when: A fork or `/btw` just failed with expected/got ordinal
Retrying the control command can interrupt the main turn in the documented failure branch.
- Copy the side-message to a local editor.
- Do not resend `/btw <message>` or inline `/feedback` in that active thread.
- Tell the main agent to ignore any misrouted side-message if it already appeared.
- Wait for the current main turn to reach a safe stopping point.
Expected: The active task is not repeatedly redirected by failed side-chat payloads.
Move work to a fresh thread
Applies when: The affected long thread cannot fork or resume reliably
A new thread avoids writing more data into the wedged projection while preserving evidence.
- Create a concise handoff summary without private data.
- Start a fresh thread and paste the handoff plus the intended new request.
- Keep the original thread unmodified until a supported repair exists.
Expected: Work continues in a healthy thread without destructive state edits.
Capture a bounded diagnostic report
Applies when: You can reproduce on a current Codex build
Huge rollouts can also make in-product feedback attachments exceed upload limits.
- Record CLI version, thread age/size, history mode, expected and actual ordinal, and triggering command.
- Use the feedback dialog without large diagnostics if the full bundle is rejected with HTTP 413.
- Report the redacted signature and related issue IDs through an official channel.
Expected: The issue is traceable without uploading gigabytes of conversation history.
Verification
Prove the fix worked
- Use fork or side chat in the fresh thread and confirm it creates a separate conversation.
- Confirm the side-message does not appear in the main active turn.
- Leave the original thread available for future supported recovery testing.
Escalation
If it still fails
- Do not manually change `thread_history_projection_state` ordinals in SQLite.
- Do not delete the rollout, state database, or whole `.codex` directory.
- Do not attach an unbounded private rollout to public feedback; summarize the ordinal signature instead.
Scope
Environment and version notes
- The detailed report used CLI 0.149.1 on Linux with a six-day paginated thread and a roughly 1.1 GB rollout.
- The thread's database integrity checks reported OK despite the projection mismatch.
- Related underlying projection issues remained open when rechecked September 23, 2026.
Evidence
Sources
Source labels describe the evidence available on the checked date. A closed issue is not automatically a shipped fix.
Open failure-containment report with the exact ordinal error, payload misrouting, and feedback 413 evidence.
Related report for desynchronized thread-history projection cursors after resume.
Current product documentation for side-chat and feedback command behavior.