Failed to fork current session through the app server
Open 💬 3 comments Opened Aug 25, 2026 by aslldab1
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of Codex CLI is running?
1.0.149
What subscription do you have?
pro
Which model were you using?
gpt-5.6-sol
What platform is your computer?
macos
What terminal emulator and version are you using (if applicable)?
_No response_
Codex doctor report
What issue are you seeing?
Failed to fork current session through the app server: thread/fork failed during TUI bootstrap: thread/fork failed: failed to prepare paginated fork: thread-store
internal error: thread history projection for 01a0338d-b713-7161-bdfd-c2f900bd201b expected ordinal 4622, got 4621 (code -32603)
What steps can reproduce the bug?
/fork xxx
What is the expected behavior?
_No response_
Additional information
_No response_
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
This has the same root cause as the thread-store half of #40630 — I posted the full analysis there: https://github.com/openai/codex/issues/40630#issuecomment-5413897910
Short version: on resume (and when preparing a fork), the recorder reverse-scans the rollout tail with a typed
RolloutLineparse, which underserde_json/arbitrary_precisionrejects any record carrying a float — typically thetoken_countevent withused_percent. The SQLite projection had already accepted that record, so the recorder steps back one and re-issues its ordinal, and every later write fails withexpected ordinal N, got N-1. No crash needed, which is why you hit it on macOS. Unit test that reproduces it and a two-file fix are linked in that comment.I can reproduce the same underlying
thread/forkfailure in the Codex Desktop app on Windows.Environment
OpenAI.Codex_26.820.9563.0_x64gpt-5.6-sol(max reasoning)Reproduction and observed result
Using the Desktop UI action to open a side conversation failed for two separate, existing active local conversations. I then reproduced the same failure through the app control plane's same-directory fork operation.
Both failures return code
-32603and the same chain:The two observed ordinal pairs were:
1243, got1242418, got417The main conversations remain readable and continue to run; only the side-conversation /
thread/forkoperation fails. This reproduces across two unrelated local projects, so it does not appear to be specific to one project workspace.Expected behavior
Opening a side conversation should succeed for an otherwise usable conversation, or the product should provide a safe supported recovery that preserves the original conversation.
For privacy, I have not included thread IDs, local project paths, transcript content, or raw logs. They can be supplied privately to OpenAI if needed.