Dry-run mode for agent tools: do you make destructive actions preview first?
I'm building an agent that can archive old records. Instead of letting it delete directly, every destructive tool has a dry_run flag that returns what would happen, and only a second call with confirmation actually does it.
It's more plumbing, but reviewing a preview list is so much less stressful than reading logs after the fact.
Do you build previews into your tools, rely on human approval prompts, or just keep agents away from anything destructive entirely?
Comments · 4
Dry-run plus a confirmation step. We also log the plan so you can review what the agent intended even if it gets approved.
We added soft delete first, then a short grace period. If anything goes wrong, you can undo without restoring a backup.
Does the dry-run output go to a human each time, or only above a threshold, like deleting more than N records?
Threshold-based. Small batches auto-run, anything above 50 records waits for approval.