codex icon indicating copy to clipboard operation
codex copied to clipboard

Undo code

Open Lzzzs opened this issue 1 year ago • 8 comments

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

Lzzzs avatar Sep 30 '25 07:09 Lzzzs

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.

xzec avatar Oct 02 '25 11:10 xzec

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

collimarco avatar Oct 02 '25 19:10 collimarco

this feature would be a life saver!

morganavr avatar Nov 02 '25 14:11 morganavr

why isnt this available yet , its very much needed

Abenezer0001 avatar Nov 03 '25 16:11 Abenezer0001

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.

melohagan avatar Jan 08 '26 08:01 melohagan

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.

ericmeadows avatar Jan 09 '26 03:01 ericmeadows

You never want to revert the code and not the conversation, I believe.

I would agree with this.

melohagan avatar Jan 09 '26 08:01 melohagan

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

etraut-openai avatar Jan 31 '26 05:01 etraut-openai