Give your agent a memory of what worked.
Recent revisions are kept. Restoring one creates a new revision.