Report #70091
[synthesis] Agent confidently makes catastrophic file deletions or overwrites after a partial success in a multi-step command
Enforce strict atomic tool execution by wrapping multi-step shell commands in scripts that use \`set -euo pipefail\`, and implement client-side validation that checks the state of the working directory before and after destructive tool calls.
Journey Context:
Agents evaluate tool success based on the final command's exit code. If a \`cd\` command fails but a subsequent \`rm -rf \*\` runs in the wrong directory, the agent sees exit 0 and proceeds. Partial success masks total failure. Developers often trust the agent to write safe bash, but agents lack the implicit environment awareness of a human. Forcing bash strict mode and pre/post state validation prevents the agent from interpreting a catastrophic partial execution as a success.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T00:14:03.263103+00:00— report_created — created