Subagent Isolation
Run each subagent in its own isolated workspace (git worktree, container, branch) so parallel writes don't collide — the supervisor reconciles results when all are done.
Intent & Description
🎯 Intent
Run subagents in isolated workspaces so their writes do not collide and parallelism is safe.
📋 Context
A coding agent delegates to several sub-agents that should work in parallel — one refactors a module, another updates tests, a third writes documentation. They all want to touch the same repository at the same time.
💡 Solution
Each subagent runs in its own workspace (git worktree, container, branch, sandbox). The supervisor reconciles results back to the main workspace on completion (merge, cherry-pick, replay). Only one workspace can land changes at a time.
Real-world Use Case
- A bounded sub-task has its own tool palette, prompt, or model.
- The parent’s context should not bloat with the sub-agent’s intermediate turns.
- Sub-agents can run in parallel and their failures must be contained without affecting peers.
Source
📌 TL;DR
Give each parallel subagent its own isolated workspace — no write collisions, true parallelism, and failed agents leave their workspace intact for debugging.
Advantages
- True parallelism without write collisions — each agent has its own sandbox.
- Failed subagents leave their workspace as forensic evidence for debugging.
Disadvantages
- Setup latency — provisioning isolated workspaces adds cold-start overhead.
- Reconciliation conflicts when multiple subagents touch overlapping files.