Shadow Workspace
Mirror the workspace into an isolated, version-controlled shadow where the agent makes and reverts edits, surfacing diffs for review and promoting only accepted changes to the real tree.
Problem
An agent that writes straight to the working tree gives the human no safe boundary: a wrong edit overwrites real work, a multi-step change is hard to review as a whole, and undoing one step without losing the others is fiddly. The agent needs room to make and unmake edits freely, while the human keeps a reviewable, revertible record and the real tree stays clean until changes are accepted.
Solution
Mirror the working tree into a shadow the agent edits instead of the real files — commonly a per-task hidden git repository that checkpoints every edit, or an in-memory overlay that tracks modifications without writing to disk. Each agent edit becomes a diff the human can inspect, and any step can be rolled back to a prior checkpoint without disturbing the others. When the change is accepted it is promoted to the real working tree; if rejected, the shadow is discarded and the real tree is untouched.
When to use
- An agent edits a real workspace and a wrong edit must never corrupt the developer's files.
- Per-edit diffs and independent rollback are needed for review and recovery.
- The shadow can be kept close enough to the real tree that promotion stays clean.
Open the full interactive page →
Diagram, neighbourhood map, code examples, related patterns and full provenance.