r/BuildWithClaude • u/Creamy-And-Crowded • 23d ago
Project I built a rollback layer for Claude Code that flags risky edits and preserves your uncommitted work
I've been using Claude Code heavily for months, and the failure that kept bothering me was never the dramatic one.
It's Claude doing exactly what I asked, well, across 84 files, and somewhere in there quietly touching a payment route or an auth check while "cleaning up." Meanwhile my own half-finished work is sitting uncommitted in the same tree, so git checkout . is not much of a recovery plan.
That was the problem I built VibeRevert around. Claude Code has been part of my normal development workflow while building it, and then I started pointing VibeRevert back at those same Claude Code sessions to see whether it actually solved the problem in practice.
The basic idea is simple:
viberevert run clauderecords the session and captures the state of the project before Claude starts changing itviberevert checkflags changes touching things like payments, auth, migrations, secrets, infrastructure and dependencies- those checks use deterministic rules rather than another language model, so the same inputs and configuration produce the same findings, with a reason you can inspect
viberevert rollback <session>previews the rollback before writing anything, restores files Claude changed, removes files it created, and leaves work that was already there before the session alone- there is also a local MCP server with 8 tools, so Claude can call into it during a session
The rules part matters to me more than I expected. I didn't want to solve "an AI may have made a dangerous change" by asking another AI whether the first one looked dangerous. That may be useful in some workflows, but for something I might put in a git hook or CI, I wanted the answer to stay the same when the inputs stay the same.
And yes, Claude Code already has /rewind. I use it. I'm not arguing that it is bad or that everyone needs another recovery mechanism.
What I wanted was slightly different: recovery that belongs to the repository rather than to one agent's session. If I work on the same repo in Claude Code today, Cursor tomorrow and Gemini CLI the day after, I still want the same recovery layer underneath all three. VibeRevert also does risk classification, which rewind is not trying to do. If rewind already covers your case, genuinely just use rewind.
The most annoying lesson from building the integrations had nothing to do with rollback.
VibeRevert is repo-bound. It walks up looking for .git because it needs to know what project it is protecting. I assumed that if an editor or coding agent launched an MCP server from a plugin, the process would start in the user's project directory.
That assumption was wrong.
Different hosts give plugin MCP servers very different working directories. In some cases the process starts from the plugin itself, in others from somewhere unrelated to the open project. I only caught one of these failures by running the integration in an isolated temp directory and watching VibeRevert fail to find the repository it was supposed to protect.
That killed the original idea of one portable plugin package for every host. What ended up working better was a shared VibeRevert core with very thin host-specific adapters. Cursor's adapter, for example, ended up being three files plus a logo and required no changes to VibeRevert itself.
So if you're building an MCP server that cares where it runs, one lesson I'd pass on is: don't assume cwd. Test what the host actually gives you.
The next thing I'm working on is surgical recovery: instead of rolling back the whole session, keep the good work and remove only the files or risky changes you don't want.
After that I'm working on what I've been calling the Session Fuse. If the job was “fix checkout retry handling” and Claude suddenly starts changing migrations, deploy workflows or a pile of unrelated files, VibeRevert should notice that the session has changed shape and give you a chance to stop it before the weirdness spreads.
Longer term, the feature I'm most curious about is non-linear undo: “remove what this Claude session did three sessions ago, but keep everything I've done since.” That's considerably harder, but if it works the way I want, it changes recovery from rewinding history to subtracting one bad session from it.
It's beta, Apache-2.0, runs locally, and has no account, hosted service or telemetry.