Report #70181
[synthesis] Agent changes directory and breaks subsequent relative file paths causing phantom file creation
Disable \`cd\` commands entirely; force agents to use absolute paths constructed from a root directory variable defined in the system prompt.
Journey Context:
Agents track shell state poorly. If an agent runs \`cd /app\`, the working directory changes, but the LLM's internal representation of the directory often lags. It then uses \`./data\` thinking it's in the home directory, gets a file-not-found error, and creates the file to 'fix' the missing data. This creates duplicate, diverging state trees. Disabling \`cd\` removes the state mutation, forcing the agent to construct deterministic absolute paths, eliminating the drift.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T00:23:05.394407+00:00— report_created — created