mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-08-05 04:58:42 -04:00
d249cc7e94
Agent subprocesses (bash, python) previously inherited the container's default working directory (/app), so files created with relative paths landed in the ephemeral container layer and were silently destroyed on any docker compose up --build or container recreation. Set cwd=_AGENT_WORKDIR (resolved to <repo_root>/data at import time) and HOME=_AGENT_WORKDIR on both subprocess launchers so that: - pwd inside a bash tool returns the persistent data directory - relative paths and ~ resolve to a location that survives rebuilds - the agent can still cd to any absolute path it needs The resolution uses pathlib.Path(__file__).parent.parent / "data", which works for both Docker (/app/src → /app/data) and manual installs (<repo>/src → <repo>/data) without requiring a new env var or compose change. Fixes #2512 Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>