It can, if its file tool can. The model only proposes tool calls. The tool runs them with its own permissions. In our scripted lab, one careless 7-step tidy plan with full access lost 7 of 10 important files for good, and 0 were recoverable. The same plan inside a sandbox with a confirm step lost 0.
That is the whole answer: safety lives in the tools and below them, not in the model being careful.
What the lab did
We replayed one fixed, deliberately careless tidy plan on in-memory files: loose globs, a path that stepped outside the folder, and a duplicate merge that overwrote instead of skipping. Four setups, same plan.
With full access, the plan removed 184 files. It lost 7 of 10 important files for good, overwrote 8 files, and deleted 8 files in the neighbour folder. Recoverable: 0. There was no trash, no copy, no second chance.
With a sandbox, the same plan ran on a copy, with a trash bin and a folder fence. It removed 176 files, and 176 of 176 were found intact with their original ID and content. The 1 step that reached outside the folder was blocked. Lost for good: 0.
With a sandbox plus a confirm step, 5 destructive actions paused for approval. The reviewer unticked 7 rows that touched important files. Result: 0 important files removed, and 162 of 170 junk files still cleaned.
With a rubber stamp, approving everything unread, 7 important files were removed from the working copy. But 0 were lost for good, because the copy and the trash were still underneath. The confirm step only helps if someone actually reads it, and the layers underneath are what save you when nobody does.
The sneaky loss is overwrite, not delete. The duplicate merge let an older budget (1).xlsx replace budget.xlsx. The name survives, the content does not. Only versioned trash, copy-on-write, or snapshots bring it back.
Where the check belongs
The root cause is simple. A plan that matches too much, a loose glob, a ../ path, a duplicate merge, becomes unrecoverable loss when the tool deletes and overwrites in place and no other layer retains the old versions.
The fix is the Gatekeeper pattern: the check lives in a separate, limited-privilege component the agent cannot change, and the agent runtime itself has no file permission. The trash, the copy, and the fence sit underneath it. Our lab fence was a few lines in the same script, so treat the numbers as the shape of the effect, not a measurement of any real product.
Three layers: reach, so the agent cannot touch what it was never given; retention, so every removal is undoable; confirmation, so a human sees the destructive rows first. Any one layer alone fails. Together they took the same careless plan from 7 of 10 files lost to 0.
Read the full article, with the worked example, the crash-safe trash protocol, and the trade-offs, on System Design Simple: https://systemdesignsimple.com/would-an-ai-agent-delete-my-files/
Top comments (0)