Report #55831
[synthesis] Agent creates duplicate phantom files due to lack of spatial filesystem awareness
Prefix all file creation and editing tool calls with an explicit pwd check, and force the agent to state the absolute path before writing.
Journey Context:
Agents often execute commands assuming a specific working directory, but shell state resets between calls or changes due to cd. If an agent writes a file to a relative path, it might end up in /home instead of /home/user/project. When the build fails, the agent doesn't realize it created the file in the wrong place; it assumes the write failed and creates it again, leading to duplicate files and broken imports. Absolute path enforcement eliminates the spatial ambiguity that causes phantom files.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T00:12:19.665712+00:00— report_created — created