logoalt Hacker News

ewoodrichlast Saturday at 7:26 PM1 replyview on HN

Yes, this exact scenario has happened to me a couple times with both Claude and Codex, and it's usually git checkout, more rarely git reset. They immediately realize they fucked up and spend a few minutes trying to undo by throwing random git commands at it until eventually giving up.


Replies

foobar10000last Saturday at 8:28 PM

Yeap - this is why when running it in a dev container, I just use ZFS and set up a 1 minute auto-snapshot - which is set up as root - so it generally cannot blow it away. And cc/codex/gemini know how to deal with zfs snapshots to revert from them.

Of course if you give an agentic loop root access in yolo mode - then I am not sure how to help...