FitWhen to use it — and when not
Use it when
- Bulk changes to records, files or settings (rename, merge, archive, reprice)
- Actions that are hard to undo: deletes, sends, payments, publishing
- Tasks where the agent’s query decides the scope ("all stale contacts") and the count matters
Skip it when
- Single small edits the user can see and undo immediately
- Actions whose effect cannot be simulated honestly, such as a send to an external system you cannot read from
- Tasks cheap enough that running and undoing is faster than previewing
AnatomyThe parts of the pattern
- Dry-run triggerA named mode, not a hidden flag: "Preview changes" next to "Run".
- Summary countsCreated, changed, deleted, skipped; the first number people check.
- Change listEach item as before and after, grouped by type, with the deletes first.
- ExclusionsA checkbox per item or group to remove it from the run.
- Snapshot labelWhen the preview was computed and what it read, with a warning when it goes stale.
- Apply with drift reportApplying runs the same plan and reports anything that differed from the preview.
GuidelinesDo & don’t
Do
- Show counts first, details second, and put destructive changes at the top.
- Say what the simulation could not check: "Emails are not previewed. 12 will be sent."
- Let people exclude items and apply the rest, without regenerating the plan.
- After apply, report differences from the preview, even small ones.
Don’t
- Call it a preview when the agent only restates the plan in other words.
- Let a stale preview be applied silently; re-run it or require a confirmation.
- Mix real and simulated results in one list without a label.
- Show only the first ten items of a hundred; show the shape of the rest.
In the wildReal-world examples
Products named for reference only — no affiliation, and the demo above is an original illustration, not a copy of their UI.
For engineersImplementation notes
- Build tools with a dry-run path that goes through the same code as the real one, and returns the intended change set instead of writing it. A separate "simulate" code path drifts from the real one.
- Pin the preview to a snapshot id or a read timestamp; on apply, compare each target’s version and mark mismatches as drift.
- Apply from the change set the user approved, not from a fresh model call; the model should not decide twice.
- Cap preview size by summarising: counts and top N by risk, with a downloadable full list.
Q&ACommon questions
How is a dry run different from a plan preview?
A plan lists the steps the agent intends to take. A dry run executes those steps in simulation and shows the concrete result: which records, how many, before and after. The plan is the intent; the dry run is the effect on your data.
What if the data changes between the preview and the apply?
Pin the preview to a snapshot, compare each target’s version when applying, and report the ones that differ as drift. For stale previews, re-run or ask for a fresh confirmation instead of applying silently.
Which agent actions cannot be previewed honestly?
Anything with an external effect you cannot read from, such as sending email or charging a card. Show these as "will be sent" with the count and recipients, and do not present them as simulated results.