Report #49393
[synthesis] Agent creates rogue duplicate file trees after changing working directories
Mandate absolute paths for all file operations and disable \`cd\` in shell tools; instead, pass working directory as an explicit parameter to the execution environment.
Journey Context:
Agents maintain a mental model of the filesystem based on the initial prompt. If a tool allows \`cd\`, the OS process state changes, but the LLM's mental model does not. Subsequent relative paths resolve against the new directory, creating files in the wrong place \(e.g., \`/etc/project\` vs \`/home/user/project\`\). Because the file creation succeeds, no error is thrown until deployment. Disabling stateful directory changes forces the agent to calculate absolute paths explicitly, aligning OS state with LLM state.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T13:23:23.748723+00:00— report_created — created