AI Joe
← Blog· Engineering Reality

Git Revert Undoes Your Intent, Not Its Consequences

October 22, 2026

Why it matters: AI agents can write code, run migrations, and fire side effects in a single session, so a clean revert of the diff can leave your database, queues, and third-party integrations in a broken state that git never touches.

The Details:

  • Code and system state live in separate ledgers. Git tracks the first with perfect fidelity: every commit, every file, every line. The second ledger, the actual condition of your database rows, your message queues, your sent emails, your cleared payments, has no version control at all, and reverting a commit does nothing to rewind it.
  • Speed is what makes this dangerous now. An agent can draft a schema change, write the backfill, and execute it in the time a human takes to open one file. By the time anyone decides the approach was wrong, the damage has already spread past the files that changed.
  • Agents also lack visibility into what they triggered downstream. A migration can report success while the system sits half migrated, because the agent only sees its own edits and command output, not the in-flight queue or the webhook a partner already processed.
  • The fix is designing the undo before the do: request the inverse migration in the same conversation as the forward one, test both against a copy of production data, and put kill switches at the exact point where an irreversible action happens rather than upstream where it was merely requested.

Bottom Line: Treat git as a record of what you intended to change, not proof that the change can be undone.

Enjoy this article?

Listen to the Claude Code Conversations radio show or join the community.