Please make "/undo" back
What feature would you like to see?
It quite useful when:
- codex unintenally deletes some files which is not tracked by git.
- codex unintenally modify something when something is not git committed. It bites me several times in recent days and I miss the /undo feature each time.
Additional information
No response
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
- #8804
- #8819
- #8373
- #8214
- #7306
Powered by Codex Action
Bro i lost too much progress just because the/undo is gone!!!! :( :( :( Please put it back.
codex unintenally deletes some files which is not tracked by git.
This happened to me too just these last days, out of nowhere, been using codex since it was available, and never had this happen to me before. Suddenly it wants to "keep the git repository clean" and deletes anything regardless of it existing before starting codex or not, it doesn't seem to realize what side-effects the commands it runs actually have.
Work around, actually check things into git or keep out of reach from Codex.
git is the real solution rather than /undo here as well, the sooner you learn it, the faster you'll be able to continue working without waiting for something to come back, which likely won't come back :) Ask codex to help you learn git ;)
I find this mainly an issue where I'm working on something in a session, fine with the last few changes codex made, then it makes a bad change. If I don't remember to do a stash before the bad change then how am I supposed to revert without loosing all my progress?
I find this mainly an issue where I'm working on something in a session, fine with the last few changes codex made, then it makes a bad change. If I don't remember to do a stash before the bad change then how am I supposed to revert without loosing all my progress?
Its gone.. asking codex to fix it will make it worse. Im forced to go back to using Claude. Google anti Gravity is also a great alternative.
@etraut-openai Could you revert it back? If there is a particular reason to hide it, could you put it in experimental and warn people the reason when we enabling it?
@SunRunAway, the previous experimental implementation had problems. It was causing many issues even for users who did not use the feature. If we bring it back, it will need to be redesigned.
I used the feature often as well.
I use the following prompt as a hack to get codex to undo its changes:
I don’t like it. Undo the changes you just made in your previous message using the patch tool. Do not use git commands to revert your work. Do not touch anything else that appears changed unless you modified it directly in this session.
I use it often and it works reliably. It just takes longer. If you need to revert multiple turns, you have to send the prompt, wait for the llm to finish, backtrack and rinse-repeat.
The only caveat is that it cannot bring back deleted files. I agree with @embedding-shapes - even if the undo feature existed, it should not be considered a first line of defense against accidental file deletion.
I'm not sure what the use of this feature is? Is my workflow different from others? How I work with Codex:
- Start codex
- Ask to do something
- Once done, review it, and either:
- "approve" it by committing it to git, then restart Codex from 0 and continue with something other task
- or I got something wrong in the prompt, so I undo the work, then start a new conversation, making sure I fix the prompt
- or it got something minor to fix, so do it myself/ask it to continue. Once done, git commit it, and restart Codex
Is this workflow different from how other people are using it? Are others not using git and saving/undoing via git when needed?
I'm not sure what the use of this feature is? Is my workflow different from others? How I work with Codex:
Start codex
Ask to do something
Once done, review it, and either:
- "approve" it by committing it to git, then restart Codex from 0 and continue with something other task
- or I got something wrong in the prompt, so I undo the work, then start a new conversation, making sure I fix the prompt
- or it got something minor to fix, so do it myself/ask it to continue. Once done, git commit it, and restart Codex
Is this workflow different from how other people are using it? Are others not using git and saving/undoing via git when needed?
Ohhh,,, you read its work. Hehe, for me who rely on /undo
I only check which files its working in.. I let it code. Observe the actual app.
if it did what i wanted, good, If not. Most likely going to use /undo.
If AI is having a hard time,, thats the only time i read its code and find a solution myself.
other IDE's /coding agent have History you can switch back easily. Claude, Cursor, AntiGravity
I dont know why in Codex they make it hard to undo
I dont know why in Codex they make it hard to undo
Because you should be using git, a tool literally made for undoing changes to code when you need it.
I dont know why in Codex they make it hard to undo
Because you should be using git, a tool literally made for undoing changes to code when you need it.
Yeah right
I dont know why in Codex they make it hard to undo
Because you should be using git, a tool literally made for undoing changes to code when you need it.
"Use git" is an asinine comment on this issue. What about when I want codex to review something before I commit it? What about when it does fine in the first 9 changes but completely screws up on the 10th?
Couple this with the fact that they removed granular write/edit permissions and codex is basically unusable.
Commit after every single interaction with codex? Why? Just use Claude Code, Cursor, Antigravity, and all the others that readily support undo and expose granular permissions.
argument against git solution (btw you not need commit, just stage) - there are files like '.env' and other in .gitignore - you can't stage them and you can't undo them. Next solution is to use fs snapshots ?
@zba Indeed, some files aren't tracked, others are new, and it would be a great thing if there was a system for undoing things. Claude Code does this elegantly: they have a /rewind feature and a proper checkpoint system. Even Gemini CLI has it and looks like Codex is the only one behind in this. Nothing to offer whatsoever. Curious how OpenAI didn't yet implement this. The previous /undo was buggy. The product needs a proper rewind feature in both code changes as well as in conversation history.
@etraut-openai Well... you have access to a fully unlocked and unrestricted chatgpt version, ask it to fix it 😆
+1 please bring it back. it's the top feature that makes me favor CC over Codex
+1 please bring it back.
+1 please bring it back. it's the top feature that makes me favor CC over Codex
+1 I use this a lot in Claude Code, and this would make switching to Codex a lot easier.