ADR-004 — Git Worktree Is the Default Run Isolation
Git worktrees are the lightweight reference implementation for separate Run mutation surfaces.
Status
Accepted
Context
Concurrent Runs need independent checkouts without requiring a heavyweight sandbox. The interactive driver uses the Git control-repository root, while a bounded Run must not mutate the canonical checkout under repos/.
Decision
Use a Git worktree and branch per Run as the default execution provider. Place provider worktrees in disposable .workspace/runtime/ state, not in the control repository’s tracked files or in a context-only checkout.
Alternatives considered
Docker, devcontainers, VMs, Nix, or shared canonical checkout.
Consequences
The default is fast, Git-native, and easy to inspect. Providers can be swapped when stronger isolation is required.
Trade-offs
Worktrees are not security isolation and do not isolate ports, processes, or external services.