It's at the mechanic's now so I can't check. He did say that the lift pump looks new.
It drove mostly fine, even under acceleration, until it quit.
There were a few moments where it seemed to "clean up" and accelerate while I was at steady throttle. Kinda like when a 2-stroke hits the power band.
I've never had a diesel but I'm thinking maybe it was slightly lean/starved for fuel during those moments? And later it just quit like it ran out of fuel. I had it towed and it started and ran fine for the mechanic. That's what got me thinking that the tank vent might be holding fuel back. I wish I had thought to loosen the filler cap and see if it started. That would have given me a clue.
Some thoughts -
1) When these trucks surge or as some say buck, it is usually fuel starvation.
2) Rule #1 on this site, don’t assume any part new or reman is working or will stay working. Story after story after story on this site. It’s sad but it is true. So as Rock said don’t assume the lift pump is good because it is new. Test it and confirm It works. Also the PO may have been trying to fix this issue and put a lift pump in to see if that would fix it.
3) When you get it to run make some mental notes.
a) Which tank it is now working on?
b) Does it happen below a 1/3 of a tank or less. (Your shower head may have fallen off and you can no longer run say at 1/4-1/8 of a tank without sucking in air.)
c) Add 3 gallons of diesel, does it go away, perhaps your fuel sending unit or gauge is not working.
d) As you mentioned try the other tank.
e) But looking in the tank will answer a lot of questions.
f) Many take a 5 gallon gas can, hook to the lift pump, put the gas can in the bed and test drive. Confirms it the fuel lines, selector valve, or something in the tanks is the cause.
4) Did he bypass both the inlet and return lines or just one. Take a look and confirm both. If just one line is bypassed it could be your issue.
You also could have a fuel line letting in air. If you do have a new lift pump make sure the rubber hose from the fuel line to the lift pump is new (PO did not use the old hose.) and clamped properly on each end.
It can also be at the IP. if your IP solenoid looses power or goes bad it will cut off your fuel and shut off the engine. So a bad ignition switch (And a key chain full of keys swinging), broken wire, or failing solenoid could also cause a shut off. But it would have likely been more it died than surging/bucking and slowly dying.
Let us know what you find out.