A coding agent sees a test fail. On its next attempt, it could start over, or it could get a short explanation of what went wrong. Reflexion, a framework published in 2023, asked the agent to write that explanation and kept it in a memory that later attempts could read.
Figure 1 shows how Reflexion handles different kinds of feedback. Image by Shinn and colleagues, CC BY 4.0, unchanged.
The researchers tested feedback from several sources, including test results and assessments generated within the system. The underlying model's weights, the learned numbers that shape its responses, stayed fixed. What changed was the information the agent saw when it tried again.
The study reported gains on several tasks, including a coding benchmark. An explanation still depends on the quality of the feedback that produced it. The work showed a practical way to improve a later attempt by changing the agent's working notes, without running another round of model training.