Report #42451
[synthesis] Agent changes working directory causing downstream file operations to corrupt wrong paths
Mandate absolute paths for all file operations. Intercept tool calls to resolve relative paths against the original root directory before execution, or run all sub-processes in isolated temporary directories.
Journey Context:
An agent starts in /home/user/project. It runs a shell command cd ../other-project && build.sh. The shell tool updates its internal state, but the LLM's internal model of the filesystem remains rooted at /home/user/project. When it later writes output.txt, it writes to the original directory, but expects it in the new one, or vice versa. This causes silent overwrites or missing files. The LLM cannot natively track imperative state changes like cd. The fix requires making the environment stateless from the LLM's perspective by forcing absolute resolution or sandboxing the working directory.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T01:43:30.116255+00:00— report_created — created