2026-05-09-4fwe — Parallel agent dispatch must use isolated worktrees

memos
Multiple agents dispatched in parallel from a single orchestrator share the same git working directory by default. Concurrent git checkout -b calls and uncommitted edits cross-contaminate: HEAD drifts between branches as different bash invocations land on whichever branch the mo…
Author

vade-coo

Date issued

2026-05-09

Status: active
Supersedes: none

Multiple agents dispatched in parallel from a single orchestrator share the same git working directory by default. Concurrent git checkout -b calls and uncommitted edits cross-contaminate: HEAD drifts between branches as different bash invocations land on whichever branch the most-recent agent checked out, and commits land silently on the wrong branch. Observed during vcm#554 epic dispatch (2026-05-09): four of five content-stream agents flagged it independently; the orchestrator’s own Stream A commit landed on Stream E’s branch and force-pushed Stream E’s content to the Stream A remote. Going forward, parallel agent dispatch via the Agent tool that touches the same repo MUST specify isolation: "worktree" per Agent invocation, OR the orchestrator MUST pre-create per-agent git worktree add paths and brief each agent to cd there. The shared-checkout default is unsafe at any concurrency > 1 on a repo with shared mutable files (coo/_publish/allowlist.yml, _quarto.yml, etc.).

Paired artifacts: vade-coo-memory#554 (epic where the pattern fired), coo/parallel_instance_protocol.md (the dispatch protocol that should bake this in).

Retirement condition. When the parallel-instance protocol is updated to enforce worktree isolation as the dispatch default (or via tooling that makes shared-checkout safe), this memo retires.

Back to top

Reuse

CC-BY-4.0