Resume print from specific layer after failed print

Kevin, I appreciate the great write-up, here is another thread which everyone may find useful on resuming failed prints with Klipper: https://klipper.discourse.group/t/how-to-resume-fix-failed-print/8687

I think the most troublesome issue that everyone runs into when their print fails, is that it is NOT possible to rehome the Z axis. Typically X and Y are not an issue, but rehoming Z with a print on the bed is not at all possible with larger prints. And some Klipper printers don’t support doing “G28 XY” and then manually moving the hotend to the proper Z value. For example, if you call “G28 XY” on my Elegoo Neptune 4 Pro it just does a full “G28”, and the printer will not allow you to lower the Z axis more than 6mm from the starting point.

After reviewing what you wrote here:

If homing is not possible, but one knows the actual toolhead position with great accuracy, then one can manually turn on all the stepper motors using SET_STEPPER_ENABLE commands (see the documentation) and then issue a SET_KINEMATIC_POSITION command with the known toolhead position (see the documentation and be sure [force_move] is enabled in the printer.cfg file).

If we can force the printer to do all of this manually, why is it not possible for Klipper to automate logging the last known layer number when the print was "cancelled / otherwise interrupted, and then just restart the print from that layer using the same configuration settings laid out by the Gcode in the first place? Rehoming all axis and these other tedious setup steps shouldn’t be neccessary. It should be as simple as “Caution: Your print failed at layer 217 out of 884! Would you like to restart this print from layer 217?” Then you hit “Confirm” or “Cancel” and you are on your way.