An agent tasked with "clean up old files" deletes 2,000 files matching — Claude Certified Architect – Foundations Practice — Claude Cert Academy

An agent tasked with "clean up old files" deletes 2,000 files matching a pattern, then reports. The user discovers some important files were deleted. What anti-pattern occurred?

Answer: Acting first, confirming later: the agent performed an irreversible action (deletion) at scale without human review of the planned scope

Irreversible actions at scale require human confirmation before execution. The correct pattern: preview the files that would be deleted, present the list to the user for approval, then execute only after explicit confirmation. "Backup before delete" is a mitigation, not a prevention. The speed and accuracy of matching are not the problem — acting without confirmation is.

Continue to Claude Cert Academy