The problem

An agent can diagnose a failure, fix it and continue, then encounter the same problem in a later session and pay the cost of solving it again.

The missing step is not more memory for its own sake. It is retaining the useful lesson from real execution and making that lesson available when it becomes relevant again.

Agent Learning Loop showing six stages: Execute, Detect, Repair, Capture, Promote and Reuse.
The loop turns successful repair into reusable learning rather than disposable session history.

How it works

1Execute

Do real work. Learning begins with an actual attempt, not abstract advice.

2Detect

Notice a failure, rejected result or contradiction that contains useful information.

3Repair

Diagnose the cause, apply the fix and prove that the immediate problem is resolved.

4Capture

Record what failed, why it failed, what fixed it and how the repair was verified.

5Promote

Keep only lessons that are sufficiently useful, repeatable and supported by evidence.

6Reuse

Retrieve the relevant lesson later so the system can avoid or resolve the failure faster.

Why promotion matters

Saving everything creates noise. Saving nothing guarantees rediscovery. The judgement step is deciding which lessons deserve to survive and in what form.

A stable lesson may begin as a retrieved observation and eventually become something deterministic: a rule, validator, schema, test or tool. At that point the system no longer needs to reason through the same uncertainty every time.

The outcome I want

Experience should compound. A useful failure should leave the engineering system better equipped for the next execution, without carrying an ever-growing pile of irrelevant history.

Related thought: Determinism over probability