Advanced pause/resume for filament motion sensors

Hi. I’m currently using filament motion sensor in form of encoder. It’s nice feature, that can detect extrusion issues, and can pause print wen it happens.
By it’s design, it only detects the issue when it’s already happened, and only prevents you from further damage.
But i wonder if it’s possible to repeat gcode that was sensor detection distance behind the place where failure was detected, when resuming the print after such failure.
That will allow to save the print in some cases.

In practice, i often have a next issue. In many plastic spools the end of the filament is bend into the hole in the spool to start winding. When that bend comes to the inlet of the feed tube, it requires significant force to go through, and causes extruder to skip. Sensor detects it, but on that point damage is already done, and print is usually lost.
I think it would be nice if there would be a way to recover from such cases.

This applies to all basically open loop NC machinery. They don’t know where they succeed or fail when executing GCODE. They can only rely on sensors to tell you something went wrong. If you hit cancel on a print it don’t immediately stop until control is returned from the current queued up GCODE being executed. Hope that makes sense.

High end CNC machines run servos with encoders instead of steppers (closed loop) so they can tell if a move was actually made. Even then if an error occurs you can’t really go back and get a do over.