Readit News logoReadit News
Posted by u/elpakal a month ago
Ask HN: How Do you undo or checkout changes from Codex CLI and others?
I find it odd that telling codex to undo a change becomes a token-heavy process of examination, context referencing and reasoning when I'm used to `git checkout ...` etc. How have you handled reverting LLM generated code changes you have yet to commit? Or better yet, what is your git flow like for vibe coding?
acro-v · 21 days ago
I actually had the same pain point - so to address - built a code generator specifically around the "undo" functionality: it takes snapshots before making any updates, and then you can "restore" right from a tool with a single command: no need for manual git invocation. Literally, just a single "restore" command:

https://github.com/acrotron/aye-chat

ilkhan4 · a month ago
I haven't used Codex, but my process is the same with Claude Code as if I'm writing the code: branch off of main, tell it to write code. If I like it, commit the code. If I don't, revert the code, then tell it I reverted the code and it should do something different.

I commit on the branch about as often as I did when writing code manually: before I'm about to do something big or try something that might break other things.

verdverm · 25 days ago
Copilot has check pointing, so you like a button and it rewinds, no AI needed, just history recorded, which you should be doing. If your tool doesn't support this, get a new tool or tell them it's a requirement

Also git?