Commit Confirmation Pattern

Type: Safety pattern for agentic applications

Definition

The Commit Confirmation Pattern is the mechanism where an AI agent executes write operations on a branch or working set, then pauses to allow the human user to review all changes via a diff view before explicitly confirming (or rejecting) the commit. The agent cannot finalize writes without human approval.

This pattern is distinct from branch-aware writes (which is about where the agent writes) — commit confirmation is about when the commit happens relative to human review.

How It Works

  1. Agent executes writes on a branch or working set (not main)
  2. Visual diff appears — modified rows/tables highlighted, uncommitted changes viewable
  3. Agent pauses — holds off on making a Dolt commit
  4. User reviews the diff — checks what was changed, approves or rejects
  5. User hits confirm — agent commits the changes
  6. Or user rejects — agent can rollback to the prior state

Why It Matters

Without this pattern, agent writes are fire-and-forget. The user has no way to verify changes before they're permanent. With MySQL (no version control), the agent inserts data and the user can only hope it was correct. With the Commit Confirmation Pattern:

  • Impossible for agent to break database without explicit human approval
  • Every write is reviewable before it's committed
  • Every commit is reversible via Dolt's version control

Relationship to Other Patterns

  • Branch-Aware LLM Writes: Complementary — agent writes on branch, user reviews diff, then merges. Commit confirmation is the enforcement of this pattern.
  • Chat on the Side: The UI pattern that enables the diff review — the chat panel shows the agent's actions, the main panel shows the diff.
  • Dolt as Agentic Database: The infrastructure that makes this possible — Dolt's version control primitives (branches, diffs, commits) are the foundation.

Examples

  • Dolt Workbench agent mode: agent inserts data → yellow highlights appear → "Uncommitted changes" button → user reviews → confirms commit
  • Cursor code review: agent writes code → diff view → user reviews → merges branch
  • Factory pipeline gates: agent completes phase → human reviews artifacts → approves move to next phase

Source

From Cursor for SQL — Introducing Agent Mode: "Since we can now preview changes before they're actually committed, the agent will hold off on making a Dolt commit until the user grants explicit confirmation. This makes it impossible for the agent to break your database."