File Checkpoints & Rollback
Every time your Agent runs a destructive command (file edits, shell commands), Myrm automatically captures a Shadow Git snapshot of your workspace. You can view changes, selectively restore files, and the Agent automatically adapts to your rollbacks.How It Works
Automatic Snapshot
Before any destructive action (file writes, bash commands), the system transparently snapshots all tracked files using an isolated Shadow Git repository — completely separate from your project’s
.git.Visual Timeline
Open the History panel to see a chronological timeline of all snapshots. Each card shows which files changed, with line-level statistics (+X/-Y lines).
Selective Restore
Choose specific files to roll back while keeping other changes. Or restore everything at once with a confirmation dialog.
External Effect Warnings
When a command involves irreversible side effects beyond the file system, Myrm flags it:| Category | Examples | Warning |
|---|---|---|
| Database | psql, mysql, redis-cli, mongo | DB mutations cannot be undone by file rollback |
| Network | curl -d, http POST, wget --post | HTTP writes already sent to remote servers |
| Container/Cloud | docker rm, kubectl delete, terraform apply | Infrastructure changes persist externally |
“Files will be restored, but database/network/container changes made during this command cannot be reversed.”
Zero Configuration
File checkpoints work out of the box:- No setup required — enabled by default on all deployment modes
- No git pollution — Shadow Git is completely isolated from your project
- No performance impact — async snapshots with 3-second timeout
- Auto storage management — 50 snapshots per project, 2GB global cap, automatic cleanup
Storage Architecture
The Shadow Git system uses a shared bare repository with per-project refs:- Content deduplication — identical files across projects stored only once
- Orphan cleanup — deleted projects automatically pruned
- Corruption repair — automatic
git fsck+ repack on detection - Global gc — periodic garbage collection keeps disk usage minimal
Crash Recovery
If the server crashes mid-task:- LangGraph’s persistent SQLite checkpointer saves full state at every graph transition
- On restart,
OfflineDurableTaskdetects interrupted tasks - Tasks resume from the exact interruption point — no user action needed
6-Layer Resilience System
File checkpoints are just one layer of Myrm’s comprehensive interruption recovery system:| Layer | What It Protects | Recovery Mechanism |
|---|---|---|
| Graph State | Entire agent execution state | LangGraph SQLite checkpointer with incremental dill serialization |
| Subagent Tasks | Child agent work during shutdowns | Automatic SIGTERM checkpoint save + seamless resume |
| Conversation Fork | Conversation exploration branches | Fork from any checkpoint with full parent lineage tracking |
| Goal Management | Long-running goals paused by budget/user | Resume with counter reset, preserving all prior progress |
| File Snapshots | Workspace file modifications | Shadow Git with selective restore + Agent auto-awareness |
| Stream Recovery | Network interruptions during LLM streaming | 4 strategies: oneshot, continuation, truncation, overflow failover |
