r/OmniRoute

▲ 8 r/OmniRoute+2 crossposts

My AI coding agent flattened 95,000 files in my Downloads folder trying to "organize" them. Here's what I learned, and why I think Windows needs something like a black box recorder for file operations.

Long story short: I asked an AI coding agent (running through a local IDE + free-tier model) to sort a messy Downloads folder — thousands of business documents, tax records, project files, in every format imaginable. Simple instructions: group related files together, skip anything from the last two months, never delete anything.

It moved things. Then I asked it to undo a mistake. It "rolled back" — except its rollback script didn't know the difference between a folder it had just created and a folder that was already there before it touched anything. It flattened an entire pre-existing, carefully organized folder (a Chrome extension dev environment with nested profile data) into 95,000 loose files sitting directly in Downloads, collisions everywhere, folder structure gone.

Nothing was actually deleted. But for about 18 hours I had no idea what was junk and what was irreplaceable, and the agent kept confidently proposing new "fixes" that would have made it worse.

What actually saved me: pulling the raw operation logs the agent had already written (CSV move logs), writing deterministic Python to diff and count instead of trusting another regex-guessing pass, and a full Get-ChildItem -Recurse snapshot to see ground truth. Turned out 91,673 of those 95,000 "lost" files were just cached browser extension data — completely disposable — and the actual irreplaceable content was under 500 files. But I only knew that because I could reconstruct it by hand from logs. If those logs hadn't existed, I'd have had no way to know.

This is the part that stuck with me: Windows has no first-class way to answer "what did this process just do to my files, and can I revert it." NTFS actually has this info — the USN Journal logs every create/rename/move/delete system-wide, regardless of source — but it's a low-level forensics API, only used by DFIR tools built for investigators after a breach, not by regular people who just watched an agent go sideways. It also only retains ~20 days by default, less if there's heavy I/O.

I'm considering building a small local-only Windows tool that tails the USN Journal continuously, keeps its own rolling week of history, and gives you a simple "what changed, revert to this point" UI — basically a seatbelt for anyone letting an AI agent (or a bad script) touch their filesystem in bulk.

Genuinely asking before I build this: has this happened to anyone else here? Cursor, Claude Code, Copilot agent mode, any of the file-editing agents — did one of them ever do something to your local files you didn't expect? What did you actually do to recover?

reddit.com
u/RepulsiveBox4582 — 14 days ago