[Codex CLI] Old context persists when forking then jumping back to a previous message in the history
What version of Codex CLI is running?
0.130.0
What subscription do you have?
Pro
Which model were you using?
gpt-5.5 high
What platform is your computer?
Darwin 25.4.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
Ghostty 1.3.1 (latest)
What issue are you seeing?
I forked an active session into a new Ghostty terminal pane. To remove unnecessary recent context, I pressed Escape twice to navigate back to a much earlier message in the history. I then pressed Enter, typed my new prompt, and sent it.
Expected Behavior: Reverting to an earlier point in the chat should drop all subsequent messages, giving me clean context from that specific point onward.
Actual Behavior: The CLI failed to truncate the history. My new message still included all the later conversation context that should have been removed when navigating backward. See the last 2 messages that the agent sent to see how I figured out the agent still had context. I have attached the chat logs for reference so you can review the incorrectly retained context.
What steps can reproduce the bug?
Uploaded thread: 019e0f32-c82
What is the expected behavior?
All of the messages and replies that came after the message I reverted to should be removed from the agent's context.
Additional information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗