Codex CLI loses conversation history after session resume (history truncated)
What version of Codex CLI is running?
codex-cli 0.116.0
What subscription do you have?
Pro
Which model were you using?
gpt-5.4 xhigh
What platform is your computer?
Darwin 25.3.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
VSCode, Antigravity
What issue are you seeing?
Codex CLI intermittently loses a significant portion of conversation history after resuming a session.
During active usage, everything works normally and the conversation history appears intact. However, after closing the session and later resuming it, a large segment of the conversation (typically between the session start and the point it was closed) is missing.
The history appears to be truncated or cut off, making it impossible to access previous context, which disrupts workflow and continuity.
This issue does not happen immediately but occurs after working for a while within the same session.
What steps can reproduce the bug?
Start a new session in Codex CLI
Interact normally with the CLI (multiple prompts and responses over a period of time)
Ensure a reasonably long conversation is built
Close the session
Resume or reopen the same session
Observe that a portion of the conversation history is missing (cut off), especially earlier interactions within that session
What is the expected behavior?
_No response_
Additional information
_No response_
6 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
There are parts of a conversation that are not persisted to disk as part of the rollout file — for example, tool and MCP outputs. Can you provide more details about which parts of the conversation you see missing? If you look in the corresponding rollout jsonc file, do you see any missing parts present in the file? I'm trying to determine whether this is 1) expected behavior, 2) a case where items are not written to the persisted rollout file, or 3) a case where items are present in the rollout file but not being properly restored and/or displayed.
If you still have this session around, could you resume it and use
/feedbackto upload it, then post the thread ID here. That will allow us to investigate further.@etraut-openai, i have same missing context issue, 019d2cf0-0162-70f3-a5fe-b4d066b2288f
Observing the same issue. On
codex resume xyz, a chunk of the initial conversation is gonee.g.
<img width="1218" height="844" alt="Image" src="https://github.com/user-attachments/assets/d204586d-c770-46d2-8a4b-8ac1a9f9ca2f" />
https://github.com/user-attachments/assets/56b1e27e-67b0-4409-8767-e8fbde70d2da
Resume should validate replay completeness before presenting the session as restored.
Compare session index metadata, rollout JSONL item count, first/last event ids, and the last persisted event id used for replay. If the replay is truncated, show a degraded resume state and keep the raw transcript available instead of letting missing history look like normal context.
---
_Generated with ax._