▲ | iudqnolq 5 days ago | |
I've found Claude to be terrible at undoing. It feels analogous to what would happen if you put me in front of a broken project without source control that I've never seen before and asked me to fix it without giving me enough time to actually understand it. It starts from errors and bugs, guesses corresponding source code, and tries to narrowly fix just that snippet. Generally it favors deleting, but not specifically deleting new code. I would have thought it could record a log of its actions and use that log to think about undoing. I would also think it could annotate lines with git blame so it knows undoing wouldn't involve changing anything more than say a day old. Unfortunately that isn't consistent with what I've seen. I just make a WIP git commit and run git commit -A --amend --no-edit after manually reviewing each unit of work. Edit: I also wish Claude implemented undo at a higher level instead of relying on the model. Some combination of snapshotting the whole repo and tracking operations that have precise inverses. But I understand that would have drawbacks. | ||
▲ | nsonha 4 days ago | parent [-] | |
maybe a system prompt to tell it to do checkpoints. Stash is one way, another is jujutsu with git backend. If this was Claude Code then hooks would be the perfect place to put that logic. |