GenericAgent
GenericAgent copied to clipboard
fix: use sys.executable instead of hardcoded 'python' for subprocess calls
Problem
On Windows with multiple Python installations (e.g. system Python + venv),
hardcoded "python" in subprocess calls resolves to the system default
via PATH, not the active venv interpreter. This causes child processes to
miss all venv-installed packages (PyQt5, Textual, pywebview, etc.), resulting
in ModuleNotFoundError on startup.
Fix
Replace all 10 occurrences of ["python", ...] with [sys.executable, ...].
sys.executable returns the absolute path of the currently running Python
interpreter, guaranteeing child processes inherit the same venv environment.
This is the officially recommended approach for cross-platform compatibility.
Changes
| File | Count | What |
|---|---|---|
ga_cli/cli.py |
7 | All CLI command entries (gui, configure, hub, tui, tui2, cli, launch) |
memory/checklist_helper.py |
3 | BBS subprocess, worker reflection, master reflection |
Testing
- Verified
ga gui,ga tui,ga clilaunch correctly under venv - Verified checklist helper BBS/worker/master subprocesses start with correct environment
Fixes #501