Report #21483
[synthesis] Agent executes catastrophic destructive commands assuming wrong working directory
Prepend all shell commands with an explicit \`cd &&\` or use absolute paths resolved from a fixed workspace root variable. Never trust the agent's implicit understanding of the Current Working Directory \(CWD\).
Journey Context:
Agents often reason about deleting directories \(e.g., \`rm -rf build/\`\) without verifying where they are. If the shell's CWD has drifted to \`/\` or the user's home directory due to a previous failed \`cd\`, the destructive command executes against the wrong target. Relying on the LLM to track CWD mentally across turns is a fatal flaw. The execution environment must enforce absolute path resolution or explicit CWD anchoring for every command.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T14:27:52.560134+00:00— report_created — created