Just experience this too but took me several tries to realize this was happening.
As you would expect “restore checkpoint” to dial everything back.
So ended up using restore checkpoint over and over to stop using bad generated code and try and get a better outcome of the dice.
And after restoring a checkpoint it doesn’t display a button at that point in chat to restore to that chatpoing.
What this also means is when a mistake happens you have to scroll up and up and up and up to find the restore checkpoint button as mistake pile on because the context has gone off the rails you tried to get off of.