Hi, my name is ***** ***** you for asking your question, I will try and help you out.
iT sounds like your fuel shutdown solenoid is loosing power shutting down engine, check for power when engine dies out, there are 3 wires, one is ground, one is power during cranking only, other one should have power anytime key is on, you can use test light to check for power,
To get machine back to your house remove shutdown solenoid and engine will stay running while you find out if you are loosing power to it.
Possible causes to loosing power to solenoid is low oil pressure switch, low coolant switch, high coolant temp, or a breaker for shutdown solenoid, that is why it will restart right away. You may also have a bad shutdown solenoid if you are not loosing power.
Please let me know if you'd like to discuss this further...just click the reply button or use the reply box below to let me know.
If this has been helpful, please take a moment to use the stars at the top of the page to rate my personal service to you.
Questions or problems let me know I'm happy to assist.