Claude Code's checkpoints don't cover shell commands. So I built undo for them A developer built undoagent, an MIT-licensed CLI and Claude Code plugin that snapshots a project before and after each agent prompt, so file changes made by shell commands — rm -rf, sed -i, codegen scripts and formatters — can be listed, diffed, undone or rewound. The tool fills a gap in Claude Code's built-in checkpoints, which only track edits made through its file tools. It stores snapshots in ~/.undoagent, never reads or writes the project's own .git, respects .gitignore, skips node_modules and has zero npm dependencies. AI coding agents are fast. They're also fast at breaking things. Claude Code has checkpoints, and they're great for edits made through its file tools. But they don't track files changed by shell commands. When the agent runs rm -rf , a sed -i , a codegen script or a formatter, those changes are outside what rewind can bring back. So I built undoagent : a small CLI that turns every prompt into a checkpoint, whatever the agent used to change your files. I asked Claude Code to "remove the notes folder using rm -rf and convert app.js to ES modules". It did exactly that. Then: bash $ undoagent list time files what 1 17:44 4 Clean up this project: remove the notes folder using rm -rf… $ undoagent diff --stat app.js | 2 +- notes/decisions.md | 1 - notes/todo.md | 2 -- package.json | 3 +++ $ undoagent undo ✓ Undid 1: Clean up this project: remove the notes folder using rm -rf… ~ app.js + notes/decisions.md + notes/todo.md - package.json The deleted folder is back, app.js is restored, and the package.json the agent added is gone. undoagent undo 3 reverts only turn 3. undoagent rewind 3 . you submit a prompt → snapshot A the agent works → edits, shell commands, scripts… the agent finishes → snapshot B one turn = the difference between A and B ~/.undoagent , pointed at your project folder. Your own .git is never read or written, and it works in folders that aren't git repos at all. --force . .gitignore , skips node modules , and has zero npm dependencies. Everything stays local. Inside Claude Code, as a plugin: /plugin install undoagent --marketplace Ahmed-Manai/undoagent That adds /undoagent:list , /undoagent:undo , /undoagent:redo , /undoagent:diff and /undoagent:rewind . Or from a terminal: npm install -g undoagent cd your-project undoagent init Then use Claude Code or Codex, or Gemini CLI as usual, and run undoagent list whenever you want to see or undo what it did. The code is MIT-licensed on GitHub https://github.com/Ahmed-Manai/undoagent . Issues and ideas are very welcome. Has an AI agent ever destroyed work you couldn't get back? What happened, and what would have saved you? I'd love to hear the stories in the comments, because they shape what undoagent handles next.