Self-Improving Agent Loops
Hand-managing every iteration of an optimization — spawning each candidate, reading
each result, tweaking the next one by hand — does not scale and wastes the operator
on work the system can do itself. The higher-leverage design is a loop that
improves itself: it proposes candidates, evaluates them against a measurable
objective, keeps what wins, refines from there, and repeats until it converges —
all without a human in the inner loop.
The shift is from operating the search to architecting it. The system does the
heavy lifting of generation and evaluation. The human sets the problem up, reviews
the proposals, disengages, and returns to a finished result. This generalizes far
beyond code: research directions, experiment design, hyperparameter and config
search, prompt and policy optimization, content variants — anything where "try a
candidate, score it, improve" is the unit of work.
The Non-Negotiable: human owns architecture and the final decision
Automating the loop does not mean ceding judgment. The system searches; the
human decides what the search is for and whether the result ships.
The human always owns:
- The objective. What "better" means, as a measurable quantity, not a vibe.
- The search space and constraints. What the system is allowed to vary, the
budget, and the guardrails it must not cross.
- The stopping condition. What counts as converged or good enough.
- The final decision. Accepting, shipping, or discarding the result. The loop
proposes; the human disposes.
The loop owns the tedious middle — generating candidates, running evaluations,
comparing, and refining — precisely because that is the part that is mechanical and
high-volume. If a step requires taste, novel architecture, or an irreversible
real-world commitment, it belongs to the human, not the loop.
The four-step human-in-the-loop workflow
This is the operator's interaction model. The human is in the loop at the
boundaries, not inside every iteration.
- Request. Ask the system for its best candidate hypotheses or strategies for
the stated objective. Let it propose the directions; do not pre-decide them.
- Review and configure. Inspect the proposals, prune the bad ones, and set the
parameters: objective, search space, evaluation method, budget, and stopping
condition. This is where human judgment is spent.
- Disengage. Step away completely. The loop runs unattended — generating,
evaluating, and refining — without per-iteration babysitting. Watching it run is
wasted operator time; trust the convergence criterion and the guardrails you set.
- Return and decide. Come back to completed reports and an optimized result.
Verify it against the real objective, then accept, ship, or reject. The decision
is yours; the search was the system's.
The value of the model is concentrated in steps 1–2 (setup) and step 4 (decision).
Step 3 is where the leverage comes from: the system works while you do not.
The loop
1. PROPOSE candidates for the objective (the system generates these)
2. EVALUATE each against the measurable objective, the same way every time
3. SELECT the winners; discard or down-weight the rest
4. REFINE generate the next round informed by what won and why
5. CHECK converged or out of budget? if not → back to step 1
6. REPORT surface the best result, the trajectory, and the evidence
Loop-until-converged, not loop-forever. Each round must be informed by the last —
a refinement step, not a fresh random draw — or it is search without learning.
Design requirements
- A measurable objective. The loop can only optimize what it can score. Define
a concrete, reproducible metric the system computes itself each round (a fraction
of tests passing, an eval score, a benchmark number, a rubric). No human-judged score in
the inner loop, or the loop stalls on you.
- Automated evaluation. Scoring must run without a human, identically each
round, or the loop is not autonomous. If evaluation needs taste, you have not
closed the loop — fix the metric first.
- A bounded search space and budget. Cap iterations, cost, and what the system
may vary. An unbounded self-improving loop is an unbounded bill and an unbounded
risk surface.
- A convergence / stopping condition. Stop on a plateau (rounds stop improving),
a target reached, or budget exhausted. Grinding past the plateau adds cost and
risk without gain.
- Guardrails on autonomous action. Anything the loop does that touches the real
world — spending, deploying, sending, deleting — needs an explicit boundary. The
loop may search freely inside a sandbox; crossing out of it is a human decision.
- A trajectory record. Keep what was tried, what each candidate scored, and why
a winner won. Grade the journey, not just the final number — a good result from a
broken or overfit search is not trustworthy.
Done means
The loop ran unattended to convergence and produced a result that is better on
the stated objective, with a trajectory record the human can inspect, and the
human reviewed and explicitly accepted (or rejected) it. Not "the loop finished" —
the loop finishing is a claim; the verified, accepted result is the outcome.
Verify the winning candidate against the real objective yourself before accepting
it; an autonomous loop's self-reported best is still a self-report
([[verify-delegated-work]]). A self-improving loop with no human decision at the end
is not autonomy, it is an unowned process.
When to use
- A search with many candidates and a cheap, automatable score per candidate.
- Iterative optimization (prompts, configs, strategies, experiment designs) where
"propose, score, refine" is the natural unit and a human-in-the-inner-loop is the
bottleneck.
- Sustained improvement efforts where the operator's time is better spent on the
objective and the decision than on running each round.
When not to use
- One-shot tasks with a single obvious endpoint and no search.
- Objectives that cannot be measured without human judgment each iteration — close
that gap first, or the loop cannot run unattended.
- Irreversible real-world actions inside the inner loop. Keep the loop in a sandbox;
the commitment is a separate, human-owned step.
Anti-patterns
- Babysitting the inner loop. Watching every iteration defeats the point; the
leverage is in disengaging. If you cannot disengage, your stopping condition or
guardrails are not trustworthy yet — fix those, do not hover.
- A loss you do not actually measure. A "self-improving" loop with a vibe metric
is not improving anything measurable ([[product-loss-descent]]).
- Refinement that ignores prior rounds. Re-rolling random candidates each round
is search without learning; each round must build on what won.
- No budget or stopping condition. An unbounded loop burns cost and risk past
the point of diminishing returns.
- Letting the loop make the final call. The system proposes; the human owns the
architecture and the decision to ship. Removing the human from step 4 is not
automation, it is abdication.
- Trusting the loop's self-reported best without checking it. A converged result
is a claim until verified against the real objective ([[verify-delegated-work]]).
1---2name: self-improving-agent-loops3description: Use when designing a system that should autonomously generate, evaluate, and refine its own candidate solutions (agents, prompts, configurations, experiments) in a loop — rather than hand-managing each iteration. The system does the search; the human owns the architecture and the final decision.4---56# Self-Improving Agent Loops78Hand-managing every iteration of an optimization — spawning each candidate, reading9each result, tweaking the next one by hand — does not scale and wastes the operator10on work the system can do itself. The higher-leverage design is a **loop that11improves itself**: it proposes candidates, evaluates them against a measurable12objective, keeps what wins, refines from there, and repeats until it converges —13all without a human in the inner loop.1415The shift is from *operating* the search to *architecting* it. The system does the16heavy lifting of generation and evaluation. The human sets the problem up, reviews17the proposals, disengages, and returns to a finished result. This generalizes far18beyond code: research directions, experiment design, hyperparameter and config19search, prompt and policy optimization, content variants — anything where "try a20candidate, score it, improve" is the unit of work.2122## The Non-Negotiable: human owns architecture and the final decision2324Automating the loop does **not** mean ceding judgment. The system searches; the25human decides what the search is *for* and whether the result ships.2627The human always owns:2829- **The objective.** What "better" means, as a measurable quantity, not a vibe.30- **The search space and constraints.** What the system is allowed to vary, the31 budget, and the guardrails it must not cross.32- **The stopping condition.** What counts as converged or good enough.33- **The final decision.** Accepting, shipping, or discarding the result. The loop34 proposes; the human disposes.3536The loop owns the tedious middle — generating candidates, running evaluations,37comparing, and refining — precisely because that is the part that is mechanical and38high-volume. If a step requires taste, novel architecture, or an irreversible39real-world commitment, it belongs to the human, not the loop.4041## The four-step human-in-the-loop workflow4243This is the operator's interaction model. The human is in the loop at the44boundaries, not inside every iteration.45461. **Request.** Ask the system for its best candidate hypotheses or strategies for47 the stated objective. Let it propose the directions; do not pre-decide them.482. **Review and configure.** Inspect the proposals, prune the bad ones, and set the49 parameters: objective, search space, evaluation method, budget, and stopping50 condition. This is where human judgment is spent.513. **Disengage.** Step away completely. The loop runs unattended — generating,52 evaluating, and refining — without per-iteration babysitting. Watching it run is53 wasted operator time; trust the convergence criterion and the guardrails you set.544. **Return and decide.** Come back to completed reports and an optimized result.55 Verify it against the real objective, then accept, ship, or reject. The decision56 is yours; the search was the system's.5758The value of the model is concentrated in steps 1–2 (setup) and step 4 (decision).59Step 3 is where the leverage comes from: the system works while you do not.6061## The loop6263```641. PROPOSE candidates for the objective (the system generates these)652. EVALUATE each against the measurable objective, the same way every time663. SELECT the winners; discard or down-weight the rest674. REFINE generate the next round informed by what won and why685. CHECK converged or out of budget? if not → back to step 1696. REPORT surface the best result, the trajectory, and the evidence70```7172Loop-until-converged, not loop-forever. Each round must be informed by the last —73a refinement step, not a fresh random draw — or it is search without learning.7475## Design requirements7677- **A measurable objective.** The loop can only optimize what it can score. Define78 a concrete, reproducible metric the system computes itself each round (a fraction79 of tests passing, an eval score, a benchmark number, a rubric). No human-judged score in80 the inner loop, or the loop stalls on you.81- **Automated evaluation.** Scoring must run without a human, identically each82 round, or the loop is not autonomous. If evaluation needs taste, you have not83 closed the loop — fix the metric first.84- **A bounded search space and budget.** Cap iterations, cost, and what the system85 may vary. An unbounded self-improving loop is an unbounded bill and an unbounded86 risk surface.87- **A convergence / stopping condition.** Stop on a plateau (rounds stop improving),88 a target reached, or budget exhausted. Grinding past the plateau adds cost and89 risk without gain.90- **Guardrails on autonomous action.** Anything the loop does that touches the real91 world — spending, deploying, sending, deleting — needs an explicit boundary. The92 loop may search freely inside a sandbox; crossing out of it is a human decision.93- **A trajectory record.** Keep what was tried, what each candidate scored, and why94 a winner won. Grade the journey, not just the final number — a good result from a95 broken or overfit search is not trustworthy.9697## Done means9899The loop ran unattended to convergence and produced a result that is **better on100the stated objective**, with a trajectory record the human can inspect, and the101human reviewed and explicitly accepted (or rejected) it. Not "the loop finished" —102the loop finishing is a claim; the verified, accepted result is the outcome.103104Verify the winning candidate against the real objective yourself before accepting105it; an autonomous loop's self-reported best is still a self-report106([[verify-delegated-work]]). A self-improving loop with no human decision at the end107is not autonomy, it is an unowned process.108109## When to use110111- A search with many candidates and a cheap, automatable score per candidate.112- Iterative optimization (prompts, configs, strategies, experiment designs) where113 "propose, score, refine" is the natural unit and a human-in-the-inner-loop is the114 bottleneck.115- Sustained improvement efforts where the operator's time is better spent on the116 objective and the decision than on running each round.117118## When not to use119120- One-shot tasks with a single obvious endpoint and no search.121- Objectives that cannot be measured without human judgment each iteration — close122 that gap first, or the loop cannot run unattended.123- Irreversible real-world actions inside the inner loop. Keep the loop in a sandbox;124 the commitment is a separate, human-owned step.125126## Anti-patterns127128- **Babysitting the inner loop.** Watching every iteration defeats the point; the129 leverage is in disengaging. If you cannot disengage, your stopping condition or130 guardrails are not trustworthy yet — fix those, do not hover.131- **A loss you do not actually measure.** A "self-improving" loop with a vibe metric132 is not improving anything measurable ([[product-loss-descent]]).133- **Refinement that ignores prior rounds.** Re-rolling random candidates each round134 is search without learning; each round must build on what won.135- **No budget or stopping condition.** An unbounded loop burns cost and risk past136 the point of diminishing returns.137- **Letting the loop make the final call.** The system proposes; the human owns the138 architecture and the decision to ship. Removing the human from step 4 is not139 automation, it is abdication.140- **Trusting the loop's self-reported best without checking it.** A converged result141 is a claim until verified against the real objective ([[verify-delegated-work]]).