Agentic systems / field notes

Loop Engineering: stop prompting the agent, build the system that prompts it.

A framework from a senior Anthropic engineer: autonomous agents that Discover their own work, Isolate it in branches, Execute fixes, and Verify before merging. No human in the prompt box.

DISCOVERISOLATEEXECUTEVERIFYMERGEthe loop

The Core Shift

Manual prompting scales with your attention. A loop system scales with your infrastructure.

before

Manual prompting

human prompt agent paste result repeat

  • You are the scheduler, router and reviewer
  • Work stops when you stop typing
  • Context is copied by hand, errors slip through
after

Loop system

signals discover isolate execute verify

  • Failing CI and open issues are the prompt
  • Branches isolate every attempt
  • Tests gate every merge, humans handle escalations

Run the Loop

A mock repo has a failing CI run and three open issues. Press Play (or Step) to watch the agent discover work, branch, patch, verify and merge.

DISCOVERISOLATEEXECUTEVERIFYMERGE
acme/paymentsCI failing
  • #142 flaky test: retry logic in webhook handler
  • #141 upgrade stripe sdk to v14
  • #139 docs: rotate api keys guide
mainagent/fix-142
- retries = 0 # never retried + retries = 3 + backoff = exponential(base=0.5)
run log

idle — no run yet. Press Play to let the agent find its own work: it will read the failing CI signal, pick issue #142, branch, patch, verify and merge.

Design Principles

The loop only stays safe if these four properties hold.

Idempotent tasks

Re-running a task must be harmless. Loops retry; side effects must not compound.

Isolation

Every attempt lives on its own branch or sandbox. Failure is cheap and revertible.

Verification gates

Nothing merges without passing automated checks. The gate, not vibes, decides.

Human escalation

When the loop stalls or stakes are high, it files a report and pages a human.

Check Your Loop Literacy

Six quick questions. Instant feedback, score at the end.

Enjoy this tool? Build your own with Super