Ill tell you right now this exact thing has happened to me a few times. I have a cat skid steer with a perkins engine but with the exact thing you are describing. I change the fuel filters and it works like a million bucks. It happens periodically, starts running like sh$t, wont stay running, etc. New fuel filters....its like a new machine. If you just got it you should probably change all your filters anyways just to start a maintenance schedule. You might find that it fixes your problem also.
Edit...i just read that you already did it.