Lift pump does not run on a hot start until its relay see's a live output from alternator,ie engine running.
So suspect air leaks,either injector leak off pipes or the pipe fittings at the filter head as these are a push fit with two 'o' rings in each.
Check the clear fuel pipe from the filter to injector pump for the passage of air on a hot start,observe the pipe again on a cold start as glow plugs run,when glow plugs are on the lift pump operates so it may be clearing any air before starting that would not get shifted on a hot start.
Sounds like fuel problem or lack of it because it runs ok after the initial hiccups.
Due to the lift pump not supplying fuel on a hot start until engine is running any air leaks will be amplified as the injector pump will try to suck fuel and then draw air from the source of the leak.
If the engine runs smooth when hot then you only have an air leak somewhere,if it runs rough when hot then the lift pump may be giving not enough fuel,they can still work and buzz but not chuck out much.They should give around 180ml every 20 seconds (thats the test data from a land rover p38 with Bmw m51 engine).
On this fuel system the lift pump can send fuel but the injector pump can suck extra fuel through it while it is pumping,so any air leak at engine bay with the filter being the highest point will see fuel run back to tank,hence the good cold start as the lift pump clears the air out of lines.
If you are going to remove the push in fittings on the fuel filter do not pull hard on them as they break very easily,instead remove the wire clip and then gently use a flat head screwdriver against the rear of the plastic ramp shaped bit that the wire would lock in to and ease them forwards each side a bit at a time.Plenty of patience as one of mine took 20 minutes to remove once. Only remove as a last resort if you are certain that they are letting in air.