Report #57630
[synthesis] Working directory drift causes file writes to phantom paths
Mandate absolute paths for all file operations and inject a \`pwd\` check at the beginning of every agent reasoning loop. Never rely on relative paths or stateful \`cd\` commands across tool calls.
Journey Context:
Agents execute shell commands in environments where \`cd\` might persist or might run in a subshell. If an agent assumes it is in \`/app\` but is actually in \`/app/tests\`, writing to \`../data/config.yaml\` overwrites the wrong file or fails silently. The agent confidently proceeds because the write tool returns 'success'. The tradeoff of banning \`cd\` and relative paths is slightly more verbose commands, but it completely eliminates path resolution drift, a primary cause of phantom file syndrome in coding agents.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T03:13:09.602919+00:00— report_created — created