Snapshots + Revert
Pre-mutation capture → durable snapshot → revert command → reload broadcast
Before AI mutations, file snapshots are stored so users can revert individual files or full runs.
Point-in-time backups of files before AI agent modifications
Snapshot Creation (during AI runs)
Revert Flow
Notes
Snapshots are created automatically at the start of each AI code mode run. The before-content of every mutated file is saved to .agent/snapshots/<id>/. Supports single-file revert, full-snapshot revert, and cascade revert (multiple snapshots in reverse-chronological order with per-file deduplication). Rolling limit of 10 snapshots. Reverts trigger HMR full-reload via the ProjectCoordinator.