Undo code

Resolved 💬 8 comments Opened Sep 30, 2025 by Lzzzs Closed Jan 31, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What feature would you like to see?

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.

Are you interested in implementing this feature?

_No response_

Additional information

_No response_

View original on GitHub ↗

8 Comments

xzec · 9 months ago

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 /undo and /redo commands like opencode is doing it.

collimarco · 9 months ago

+1 This feature is absolutely necessary! You cannot commit code for every message in the conversation...

morganavr · 8 months ago

this feature would be a life saver!

Abenezer0001 · 8 months ago

why isnt this available yet , its very much needed

melohagan · 6 months ago

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.

ericmeadows · 6 months ago

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 · 6 months ago
You never want to revert the code and not the conversation, I believe.

I would agree with this.

etraut-openai contributor · 5 months ago

I'm going to close this in favor of #9203