Heuristic

Script repeatable work without making retries blind

Move stable, mechanical steps into code once their inputs and failure cases are understood. Keep judgment with the model or a person, and design recovery before letting the script repeat real actions.

About 2 min read

Before you use it

Use when
  • An AI agent repeatedly performs the same browser, CLI or data-manipulation sequence with little judgment.

Keep this limit in mind

  • Do not automate an unstable process merely because it is repetitive; first understand authority, error handling and rollback.

Current editorial reading

Extract the predictable part

Start with one recurring operation, such as normalizing an export. Define accepted inputs, expected output and errors that need attention. Test the script on representative cases, record failures and compare its results with the previous workflow. Automation has earned its place only if correctness holds and the reduced effort justifies maintaining it.

Separate preview from repeat safety

A dry run performs only its documented checks; it does not protect a later real call from duplicate effects. For writes, use the destination’s idempotency contract where available: retries of one operation retain the same identity and parameters. Without that protection, if a call times out and its result is unknown, reconcile what happened before repeating it. A new request identifier may mean a new operation.

Take it with you

Test an interrupted run in a controlled environment, including a successful write whose response is lost. Check the final state for duplicates. Stop automatic retries when the result cannot be resolved safely; a preview or log alone is not that guarantee.

Sources and evidence (3)

What we checked

Supports

The talk assigns predictable calculations to ordinary code and describes system-enforced recovery that skips already completed actions.

Practitioner design guidance, not controlled evidence that scripts always cost less or perform better. The export example and proposed checks are independently designed.

Build Systems, Not Code — Angie Jones, timestamped talk transcript · Transcript 9:26–10:44 and 13:01–15:18

Supports

Idempotent API contracts can recognize retries through a stable caller request identifier, while changed intent or parameters require different handling.

Specific API contracts determine scope and retention. A local log entry by itself does not establish atomic duplicate suppression at the destination.

Making retries safe with idempotent APIs · Reducing client complexity; Same client request ID, different intent

Limits

After a timeout, a write may already have succeeded; repeating it without a valid duplicate-handling contract can create another effect.

Selected official passages read. Reconciliation can remain uncertain, so the stopping rule is conservative editorial guidance rather than an exactly-once guarantee.

Making retries safe with idempotent APIs · Retrying and side effects; Late arriving requests

Challenges

EC2 documents DryRun as a permission check without execution, separately from ClientToken for request idempotency.

This is a concrete counterexample to treating dry-run support as interchangeable with repeat safety. Other dry-run implementations may check different things; their own contracts must be read.

RunInstances - Amazon Elastic Compute Cloud · Request Parameters: DryRun; ClientToken

Editorial sources (3)

Editorial version 1.0.0 · Evidence checked 2026-10-04

Save and practise this idea

My learning

Read. Recall. Repeat.

Save this idea and return to it on any device.

Use email
Keep exploring

Connected ideas

You are readingScript repeatable work without making retries blind

Original edition evidence and sources

These records belong to the original released edition. The current editorial reading has its own evidence above; neither set silently replaces the other.

Supports

Current agent-engineering practice recommends moving repeatable deterministic operations into scripts or tools while reserving model judgment for ambiguous decisions.

Do not automate a process before its inputs, errors and authority boundaries are understood.

Build Systems, Not Code · Assign determinism, judgment and authority; reusable scripts

All sources (1)
Original edition, downloads and provenance

The reading above is editorial version 1.0.0, bound to this exact source edition. The original data and saved downloads retain that edition and the separate editorial layer. They may contain earlier wording; use the current reading above when interpreting it.

Version 0.1.0

No review details are supplied for this edition.

Read the original edition and overlay as JSON · Release details