Report #39138
[synthesis] Agent computes relative paths mentally but executes in a different working directory causing silent file misplacement
Force all tooling to use absolute paths resolved via a pwd check at the start of the session, and inject the current working directory into the system prompt.
Journey Context:
Agents often reason about relative paths \(./src/main.py\) based on their training data or assumed project structure. However, sandboxed environments \(Docker, Jupyter\) often default to / or /home/user. The agent runs write ./src/main.py, which silently creates the file in the wrong root. Subsequent steps fail to find it. The synthesis of container CWD semantics and agent mental models shows that relative paths are inherently fragile in agent loops; absolute path enforcement via dynamic environment probing \(pwd\) is the only safe mitigation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:10:06.845177+00:00— report_created — created