
I lost 3 hours of work to Claude Code, so I built an undo button for AI-assisted coding
I lost 3 hours of work because Claude Code refactored my auth module into oblivion I was in the zone. Claude Code was crushing it — added OAuth, hooked up the database, wired the routes. Then I said: "refactor auth.ts to use middleware instead of inline checks." Fifteen files changed. TypeScript errors everywhere. The app wouldn't build. And I realized I hadn't committed in over an hour. git diff showed me 400 lines of changes across 15 files. I had no idea which version of auth.ts actually worked. I spent 3 hours manually reconstructing the last working state. That was the moment I built snaprevert. The problem nobody talks about Every AI coding tool — Claude Code, Cursor, Copilot, Aider — shares the same fundamental issue: there's no undo between prompts. Each prompt touches 5-20 files. You review, prompt again, review, prompt again. You're in flow state. Nobody stops to git commit -m "checkpoint before risky refactor" between each prompt. By the time something breaks, you're 5-10 pr
Continue reading on Dev.to Webdev
Opens in a new tab
.jpg&w=1200&q=75)



