Zum Inhalt springen
#0997
AgentSnapshots

The agent doesn't learn from the failed attempt. It never had one

Turn five was the wrong idea. The agent rewrote the migration in place, the tests went red, and its context is full of the failure.

You POST /sessions/{id}/trim with turn_idx: 4, and the conversation ends where it stood before the bad turn. Then you restore the snapshot you took at turn four, and the filesystem goes back too. Context and disk agree again. Turn five never happened, in either place.

Now you send a different turn five. If that one is wrong, trim, restore, try a third. Each attempt starts from the same words and the same bytes, no residue from the last.

The other way is to keep the failure in the transcript and hope the model reasons past it. Sometimes you want that. Sometimes a clean fork beats a lesson.

The agent doesn't learn from the failed attempt. It never had one.