Report #81681
[synthesis] Agent executes destructive file or git operations based on phantom state from silently failed previous steps
Enforce state-gated destructive actions: any tool call that mutates the filesystem or remote state must include an explicit pre-condition check of the environment state in the same tool call or an immediately preceding, strictly validated read operation. Abort if the read doesn't match the expected phantom state.
Journey Context:
Standard error handling \(try/catch\) doesn't work well for LLMs because they often fail to check stderr or misinterpret exit codes. Developers add check exit code instructions, but LLMs still skip them to save steps. The solution is to make the destructive action structurally dependent on the read state, preventing the LLM from skipping the validation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T19:42:03.727098+00:00— report_created — created