mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-02-04 07:53:08 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
@@ -845,7 +845,7 @@ class ParallelOrchestrator:
|
|||||||
"text": True,
|
"text": True,
|
||||||
"encoding": "utf-8",
|
"encoding": "utf-8",
|
||||||
"errors": "replace",
|
"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"},
|
"env": {**os.environ, "PYTHONUNBUFFERED": "1"},
|
||||||
}
|
}
|
||||||
if sys.platform == "win32":
|
if sys.platform == "win32":
|
||||||
@@ -908,7 +908,7 @@ class ParallelOrchestrator:
|
|||||||
"text": True,
|
"text": True,
|
||||||
"encoding": "utf-8",
|
"encoding": "utf-8",
|
||||||
"errors": "replace",
|
"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"},
|
"env": {**os.environ, "PYTHONUNBUFFERED": "1"},
|
||||||
}
|
}
|
||||||
if sys.platform == "win32":
|
if sys.platform == "win32":
|
||||||
@@ -1012,7 +1012,7 @@ class ParallelOrchestrator:
|
|||||||
"text": True,
|
"text": True,
|
||||||
"encoding": "utf-8",
|
"encoding": "utf-8",
|
||||||
"errors": "replace",
|
"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"},
|
"env": {**os.environ, "PYTHONUNBUFFERED": "1"},
|
||||||
}
|
}
|
||||||
if sys.platform == "win32":
|
if sys.platform == "win32":
|
||||||
|
|||||||
Reference in New Issue
Block a user