From 2507bfd5f0b225d838da6c89bbda0d26e75d26a7 Mon Sep 17 00:00:00 2001 From: Auto Date: Wed, 4 Feb 2026 08:50:36 +0200 Subject: [PATCH] fix: use project dir as cwd for parallel orchestrator subprocesses The parallel orchestrator was using AUTOCODER_ROOT as the working directory when spawning coding, batch, and testing agent subprocesses. This caused the Claude Code CLI to create .claude/ and .claude_worktrees/ directories in the autocoder installation folder instead of the project directory, scattering output files across multiple locations. Changed all 3 subprocess spawn sites (coding agent, batch agent, testing agent) to use self.project_dir as cwd, matching the behavior of the server's process_manager.py. The subprocess commands already use absolute paths to autonomous_agent_demo.py, so Python imports are unaffected. Co-Authored-By: Claude Opus 4.5 --- parallel_orchestrator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parallel_orchestrator.py b/parallel_orchestrator.py index d31db0b..e630a05 100644 --- a/parallel_orchestrator.py +++ b/parallel_orchestrator.py @@ -845,7 +845,7 @@ class ParallelOrchestrator: "text": True, "encoding": "utf-8", "errors": "replace", - "cwd": str(AUTOCODER_ROOT), # Run from autocoder root for proper imports + "cwd": str(self.project_dir), # Run from project dir so CLI creates .claude/ in project "env": {**os.environ, "PYTHONUNBUFFERED": "1"}, } if sys.platform == "win32": @@ -908,7 +908,7 @@ class ParallelOrchestrator: "text": True, "encoding": "utf-8", "errors": "replace", - "cwd": str(AUTOCODER_ROOT), + "cwd": str(self.project_dir), # Run from project dir so CLI creates .claude/ in project "env": {**os.environ, "PYTHONUNBUFFERED": "1"}, } if sys.platform == "win32": @@ -1012,7 +1012,7 @@ class ParallelOrchestrator: "text": True, "encoding": "utf-8", "errors": "replace", - "cwd": str(AUTOCODER_ROOT), + "cwd": str(self.project_dir), # Run from project dir so CLI creates .claude/ in project "env": {**os.environ, "PYTHONUNBUFFERED": "1"}, } if sys.platform == "win32":