One common misconception I keep on seeing is that people think the shutoff solenoid needs power to run the tractor, IT DOES NOT! I have seen two types of fuel solenoid systems on Kubota engines, there is an internal type connected to the fuel rail that has three wires, one being common with a small coil to run and a larger to kill the engine. The second is the external solenoid that is only energized to kill the engine. My
BX2230 with a D902 engine has this type.
The kill solenoid has two circuits involved. The one directly controling the solenoid with a timed relay in it that is controlled by the loop circuit that goes to all the switches in the second circuit. When this relay sees a pulse, even just a fraction of a second, in the switch circuit it closes the relay and the relay will stay energized for around 5 seconds or so, long enough for the fuel solenoid to shut off the fuel and all engine motion to stop.
Many people hear a click after their BX tractor shuts off, the click is the relay releasing the fuel shutoff solenoid. Most small diesel engines without common rail injection need ZERO (0) power to run. If your tractor if having trouble running and you have the external type solenoid with two wires you can disconnect the wires and the engine will keep running, also if you cannot shut the tractor down with the "KEY STOP" you can also manually move the plunger and lever to shut the fuel off. Everybody should learn how to shut their tractor off using the stop lever in case the key circuit fails.
When the tractor is dies you need to listen to see if the relay is energizing and killing the tractor , it will be an electrical problem. If it just dies with no relay clicking, be looking for a plugged fuel filter break in fuel line or lift pump not operating. Have herd alot of problems with the BXs having switch or broken/shorted wires in the switch circuits so you may start there if all else fails with checking the fuel delivery.
Hope this gives some guidance.
David Kb7uns