But the player decides whether to keep playing the game. Don’t forget that part.
Skipping past the question of whether it’s a good idea – you could omit the save_undo step, rather than blocking the UNDO command. That way, UNDO still works but it jumps back to the previous scene. This makes sense for some story design, particularly if you have a randomized challenge or password.
Inform is also structured with UNDO handled specially in the parser, for the same reason as Dialog. There is no “undoing action” in the standard action list. The UNDO-control extension therefore needs to have a special rulebook.
(At one point I was considering an extension to Glulx to add an opcode for “discard the most recent undo state.” This would permit simpler UNDO customization, at the cost of some wasted memory – some parser paths would create an UNDO state and then immediately throw it away. Is this still an attractive idea? Doesn’t help Z-code games, obviously.)