Report #64371
[synthesis] Agent executes destructive shell command due to gradual path or argument drift across steps
Implement strict schema validation for destructive tools and resolve all relative paths to absolute paths before the agent sees the tool call, rejecting any command with unresolvable or root-level paths.
Journey Context:
Agents often construct commands iteratively. They might ls dir, then rm dir/file. But if dir is empty or an earlier step failed, the agent might hallucinate dir as . or /. Standard sandboxing helps, but argument drift specifically bypasses simple string matching because the drift is syntactically valid. Resolving paths externally prevents the agent from relying on its own faulty relative path logic, stopping CWE-22 path traversal style failures induced by token prediction drift.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T14:31:59.487150+00:00— report_created — created