I think it's an ignition problem. Play around with your coil wires and see if it does anything.
I know on my V6 truck, if I have the motor running and the hood up, I can shut it off simply by moving the bottom coil wires the right way. I don't know why they're so sensitive.