[Issue #86] Spawn agents with cwd set to their worktree #88

Merged
HugoNijhuis merged 2 commits from issue-86-spawn-agents-with-cwd-worktree into main 2026-01-10 23:28:31 +00:00

2 Commits

Author SHA1 Message Date
3d9933fd52 Fix typo: use REPO_PATH instead of REPO_NAME
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 00:15:10 +01:00
81c2a90ce1 Spawn agents with cwd set to their worktree
Resolves issue #86 by having the spawn-issues orchestrator create worktrees
upfront and pass the worktree paths to agents, instead of having agents
create their own worktrees in sibling directories outside the sandbox.

Changes:
- spawn-issues orchestrator creates all worktrees before spawning agents
- issue-worker, pr-fixer, code-reviewer accept optional WORKTREE_PATH
- When WORKTREE_PATH is provided, agents work directly in that directory
- Backward compatible: agents still support creating their own worktrees
  if WORKTREE_PATH is not provided
- Orchestrator handles all worktree cleanup after agents complete
- Eliminates permission denied errors from agents trying to access
  sibling worktree directories

This ensures agents operate within their sandbox while still being able to
work with isolated git worktrees for parallel implementation.

Closes #86

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 00:12:14 +01:00