■ Runtime safety layer for AI agentsDevinClaude CodeCursor

Let agents touch prod.
Keep the undo.

Workspace checkpoints roll back local code. Unhappen sits between AI agents and your live systems — rolling back database and state changes, and stopping irreversible commands before they run.

FIG. 1 — AGENT SESSION
FIG. 2 — WHY NOW

Every incident has the same shape.

production credentials

one destructive call

backups in the same blast radius

gone, in seconds

Coding and DevOps agents now hold write access to real databases, repos and cloud accounts. When they get it wrong, they get it wrong fast.

The widely reported incidents of 2025–2026 had this shape.

FIG. 2a — PULL ONE THREAD

It isn't about one model or one vendor. Any agent with production credentials and no undo will do this eventually.

Observability tells you after the fact. Built-in agent checkpoints only rewind local files and git. Unhappen protects what leaves the workspace — live databases, cloud state, and external APIs.

FIG. 3 — HOW IT WORKS

Two modes. Every action lands in one.

01 — HAS STATE

Reversible → rolled back

Postgres, branches, and cloud state. We capture what the agent is about to mutate, let it run, and record a semantic diff. One command undoes the agent's changes without wiping concurrent production traffic.

Row-level undo: emerald spreads cell by cell from mutated → snapshotted → restored.

02 — LEAVES THE BUILDING

Irreversible → stopped

Dropping databases or backups, deleting volumes, sending emails, moving money, calling external APIs. Blocked deterministically by policy before execution, or held until a human says yes.

Deterministic policy: rose barrier stops destructive calls before a single byte leaves prod.

FIG. 3a — DECISION PATH FOR EVERY TOOL CALL
AST Decision Matrix
agenttool call / SQL──→unhappenSQL & shell AST──→reversible?0.18 ms check
│
└── no ──→policyAST + mcpxray
agent ──→ unhappen ──→ reversible? ── yes ──→ snapshot ──→ run ──→ semantic diff ──→ session journal
                            │
                            └── no ──→ policy ──┬── dangerous ──→ stop, or ask a human
                                                │
                                                └── safe ───────→ run
01 · Install & Hook
$ curl -fsSL https://unhappen.dev/install.sh | sh
$ unhappen init --mode enforce --quarantine-ddl
✓ initialized across Devin, Claude Code & Cursor
Zero-Knowledge AES-256-GCM · Rust CLIOpen Live Console (/app) →
02 · Live Trace — Path 01: Reversible Mutation & Undo
$ psql -d shop -c "DELETE FROM customers WHERE plan = 'free'"
✓ snapshot  customers: 840 target rows encrypted (AES-256-GCM) before DELETE
$ unhappen undo
↺ restored  customers: 363 → 1,203 rows (+840 restored, 3 concurrent rows preserved)

What the agent touches

  • Postgres — Supabase, Neon, RDSRollbackRow-level pre-images (DELETE, UPDATE, INSERT, CTEs) and DDL quarantine captured before the query runs; restored without losing live writes
  • Deleting volumes, backups, whole databasesStopDROP DATABASE, TRUNCATE and destructive CLI flags blocked deterministically by AST policy or held for a human
  • Terraform, Kubernetes & Cloud CLIStopDestructive commands (terraform destroy, kubectl delete, aws s3 rb --force) stopped before execution; full IaC state rollback planned
  • Email, payments, messages, external APIsStopExternal write calls and side-effect MCP tools blocked or confirmed before anything leaves the system
  • Files and gitRollback · laterAligned with workspace checkpoints so code and database state roll back together
  • SaaS — Notion, HubSpot, SalesforceRollback · laterInverse actions through the system's own API

How we sit in the path

  1. 01

    Agent hooks — Devin, Claude Code and Cursor show us every tool call before it runs

  2. 02

    Database proxy & CLI wrappers — intercepts SQL and commands (psql, terraform, kubectl, aws, gcloud) in terminals, scripts and CI

  3. 03

    MCP gateway — every MCP tool the agent uses goes through the same policy and audit log

FIG. 4 — WHERE WE FIT

A neutral layer across every agent and every system.

Stops before it runsRolls back databases & cloudWorks across agentsNo backup platform to adopt
ObservabilityLangSmith, Langfuse, BraintrustTraces and evaluates — after the factnonoyesyes
RubrikAgent Rewind + Agent IdentityEnterprise, runs on Rubrik Security Cloudyesyesyesno
CommvaultAI ProtectMonitors and reverts, can't stop third-party agentsnoyesyesno
MCP gateways & guardrailsPolicy on tool callsMCP calls only — no snapshots, no undoyesnoyesyes
Built-in agent guardrailsDevin, Claude Code, Cursor permissions, hooks, checkpointsThe foundation we build on — protects the workspace of one agentyesnonoyes
UnhappenHooks + DB proxy + MCP gatewayInstalls in seconds, starts in watch-only or enforce modeyesyesyesyes

Sources:Commvault AI Protect — The Register ↗Rubrik Agent Rewind — Computerworld ↗Rubrik Agent Identity — SiliconANGLE ↗

FIG. 5 — WHO
FIG. 5a — THE FOUNDER, IN PLUSES

Founder

Dmitrii Novikov

Dmitrii builds developer tools for AI agents and ships them end to end — CI, releases for Homebrew, Scoop, PyPI and GitHub Actions. Unhappen grows out of that open-source work.

GitHub ↗LinkedIn ↗His open-source tools ↓

FIG. 6 — OPEN SOURCE & MVP

Built on fast, deterministic open-source primitives.

Shipped

  • mcpxray ↗
    → Model Context Protocol

    Security linter for MCP servers, the protocol introduced by Anthropic. Findings map to the OWASP MCP Top 10 and feed Unhappen's MCP policy rules.

  • skillcraft ↗
    → Agent configs & skills

    Lint and sync for AGENTS.md, CLAUDE.md and SKILL.md, so instructions and guardrails don't drift across Devin, Claude Code and Cursor.

  • datadiff ↗
    → What the agent changed

    Rust semantic diff for JSON, YAML, CSV, TOML and XML, 100,000 objects in 0.4 s. Powers Unhappen's session journal and readable rollback reports.

Shipped in Rust Core · Plan for the MVPLive in /app & CLI

  1. 01

    Cross-agent hooks (Devin, Claude Code, Cursor)

    Pre-tool interception and session journaling across autonomous cloud sandboxes and local terminal agents. Supports watch-only, enforce, and hold-for-human modes.

  2. 02

    Postgres proxy & row-level undo

    Wire-protocol proxy (:5433) and SQL AST capture row-level pre-images encrypted with AES-256-GCM so `unhappen undo` restores agent mutations without overwriting live concurrent traffic.

  3. 03

    MCP gateway & AST policies

    Deterministic SQL and shell AST checks plus mcpxray policies across every MCP tool call — with 0.18 ms parse latency and zero LLM calls on the hot path.