You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Codex CLI, there are times when a generation produces unwanted changes, but there’s currently no way to roll back the edits from a specific conversation.
I would like to see the /undo command return as it's very useful. Sometimes you give a sub-optimal prompt, or you need to change the model for the particular task, and you need to try again.
The feature that would be best on this is a near-clone of what Claude does. You sometimes work on a bug and then you are wanting to jump to a past point in history that you branched off to fix a bug. This makes sense as a dev, because this is how we work. Additionally, sometimes you want to revert the conversation and the code - so, not just the work output, but the actual conversation as well. You never want to revert the code and not the conversation, I believe.
Reacted by melohagan, Will 保哥, encryptoid, Iván Sotillo del Horno and organizedattack
Activity
xzec commentedon Oct 2, 2025
Good idea. The only way to achieve "undo" now is to commit every agent's change to VCS and drop the commit if needed.
I suggest adding
/undoand/redocommands like opencode is doing it.collimarco commentedon Oct 2, 2025
+1 This feature is absolutely necessary! You cannot commit code for every message in the conversation...
morganavr commentedon Nov 2, 2025
this feature would be a life saver!
Abenezer0001 commentedon Nov 3, 2025
why isnt this available yet , its very much needed
[-]cli support undo code[/-][+]Undo code[/+]melohagan commentedon Jan 8, 2026
I would like to see the
/undocommand return as it's very useful. Sometimes you give a sub-optimal prompt, or you need to change the model for the particular task, and you need to try again.ericmeadows commentedon Jan 9, 2026
The feature that would be best on this is a near-clone of what Claude does. You sometimes work on a bug and then you are wanting to jump to a past point in history that you branched off to fix a bug. This makes sense as a dev, because this is how we work. Additionally, sometimes you want to revert the conversation and the code - so, not just the work output, but the actual conversation as well. You never want to revert the code and not the conversation, I believe.
melohagan commentedon Jan 9, 2026
I would agree with this.
etraut-openai commentedon Jan 31, 2026
I'm going to close this in favor of #9203