MonoClaw

Checkpoints & Rollback

MonoClaw creates automatic checkpoints before destructive operations. If something goes wrong, you can roll back to a known-good state.

What gets checkpointed

Before any destructive file operation (edit, delete, move), Mona:

  1. Creates a git commit in a shadow repository
  2. Stores the pre-operation state
  3. Proceeds with the operation

Shadow git repos

MonoClaw maintains a shadow git repo inside ~/.monoclaw/checkpoints/ for each project you work on. These repos:

  • Mirror your project's file structure
  • Store full history of changes
  • Are independent of your project's own git history

Automatic snapshots

In addition to operation-level checkpoints, MonoClaw takes periodic snapshots:

  • Every 5 minutes during active sessions
  • Before gateway restarts
  • Before updates
  • On demand: /snapshot in chat

Snapshots are stored as compressed archives in ~/.monoclaw/snapshots/.

Rolling back

Roll back the last operation

monoclaw checkpoint rollback

This restores files to their state before the most recent destructive operation.

Roll back to a specific snapshot

monoclaw snapshot list
monoclaw snapshot restore <snapshot-id>

Roll back in chat

/rollback

Mona will restore the project to its pre-operation state and explain what was reverted.

Manual checkpoints

Create a checkpoint on demand:

monoclaw checkpoint create "Before refactoring auth"

Or in chat:

/checkpoint

Snapshot management

List snapshots

monoclaw snapshot list

Output:

2026-05-10 14:32:01  before-gateway-restart
2026-05-10 14:28:15  auto-snapshot
2026-05-10 14:23:00  before-update
2026-05-10 14:15:42  auto-snapshot

Export a snapshot

monoclaw snapshot export <id> > snapshot.tar.gz

Clean up old snapshots

monoclaw snapshot prune --keep-last 20
monoclaw snapshot prune --older-than 7d

Integration with project git

If your project is already a git repo, Mona will:

  1. Prefer your project's git history for rollback
  2. Fall back to shadow repos for untracked files
  3. Never modify your project's git history without explicit consent

Best practices

  • Commit frequently in your own git repo — Mona respects existing commits
  • Use /checkpoint before asking Mona to make large changes
  • Review before rollback — use monoclaw snapshot show <id> to inspect
  • Clean up snapshots — Old snapshots consume disk space

Troubleshooting

ProblemFix
"No checkpoint found"Checkpoints are only created for destructive operations
"Rollback failed"The file may have been modified since the checkpoint
Large disk usageRun monoclaw snapshot prune --older-than 3d
Shadow repo corruptDelete ~/.monoclaw/checkpoints/<project> — history is lost but Mona will recreate it