One of my favorite decisions in Lemon Goal is the moment it changes its mind. An early revision scores 80, a later one scores 70, and Goal keeps the early one. Then a confirmation run puts that same early revision at 60. Now the later revision is the one Goal retains.
The code hasn’t changed between the early revision’s two runs. The evidence has. To see why that matters, follow what Goal pins, what it measures, and what it uses to choose a revision.
Pin the objective before opening the code
The engineer confirms an Improvement Session with the target Benchmark Version, starting Harness, success criteria, and directions for what may change and what must be preserved. That separates the object of search from the basis for comparison. Prompts, context construction, tool handling, or orchestration can change within the scope the engineer sets. The benchmark target does not move with those changes.
There are two different baselines. The starting measurement anchors the Goal; a target expressed relative to it doesn’t reset when the search moves to another parent. The parent implementation is the code a candidate starts from. Keeping those identities separate lets a series of supported patches build on each other without lowering the original bar.
The engineer sets both directions for the agents and measurable preservation requirements for the Goal. Directions guide what the agents investigate and edit as the search progresses. Preservation requirements make behavior the team already values part of the comparison: a candidate that regresses on a required measure can lose its place even if its headline score goes up.
Let the Manager explore without letting a patch redefine the test
The Manager reads the available evidence, forms a hypothesis about the implementation, and assigns a direction to a Patch Agent. An Epoch groups candidate experiments. A fresh candidate has its own working copy and agent conversation; the selected parent supplies the starting implementation. The Manager passes along relevant findings and decisions, not the previous Patch Agent’s conversation. That keeps the work distinct without discarding the lineage of the code being tested.
Editing, observing output, and submitting a candidate are different operations. A focused output test or hypothesis check can make a direction worth pursuing without making it a supported improvement. Submission validates the executable structure and seals a revision. Full evaluation then binds that sealed bundle and its runtime to the benchmark execution and judges the resulting behavior against the applicable Rubrics. The Patch Agent’s explanation is useful for understanding what was changed. It is not the authority for what was measured.
Each full candidate evaluation uses the pinned Benchmark Version and its Cases. The Patch Agent can change the harness; the engineer’s Goal sets the test. The engineer can also direct the agent to work from the underlying requirement and avoid shortcuts based on case identities or specific answers. When reviewing a patch, look for the change in behavior you asked for and the code that explains it.
Compare revisions across the whole session
Retention reads the measurements tied to the active Goal. Each eligible measurement links a sealed candidate to its evaluation record and assessment contract. Goal compares candidates against the same criteria, including required preservation measures. A high score on the target metric can move a candidate forward when it also meets the requirements for behavior the engineer wants to preserve.
The Manager can request another full evaluation of a candidate already measured under that Goal. The confirmation uses the same sealed revision, runtime, and pinned Benchmark Version. It gets its own execution and evaluation record and becomes the measurement Goal uses for that candidate. Here’s the selection from the opening, with one criterion to make the sequence easy to follow:
| Measurement arrives | What Goal retains |
|---|---|
| Early revision: full evaluation returns 80 | The early revision. |
| Later revision: full evaluation returns 70 | The early revision, which still leads across the session. |
| Early revision: confirmation returns 60 | The later revision. Goal compares 70 with the early revision’s confirmed 60. |
The first evaluation stays in the history. Confirmation changes which measurement drives selection for that exact revision. The selection step can therefore move back to a previously evaluated candidate without asking a Patch Agent to recreate it.
Separate a candidate we can keep from a Goal we’ve reached
Partial results follow a different comparison path. Goal can use supported bounds for an incomplete measurement when they’re available. If those bounds overlap another result, both can remain candidates, and a supported incumbent can stay in place. A preservation requirement can also remove a candidate from consideration, even when its headline result is strong.
The session records two outcomes: the retained revision and whether its evidence reaches the target. That’s how Goal can hand an engineer a revision worth reviewing even when it lands short of the original objective. The handoff includes the sealed revision, its Goal, and the evaluation that made it the choice. Those are the same inputs the team can take into a separate bench for different Cases.