Ford 6.0 diesel

Starts but runs very badly until completely warmed up. Runs great when warm.

ok dude in order to get some help your going to have to give these guys ALOT more information trust me i kno. they need model year miles and engine and give a bit more detail about what going on. thatll help alot oh and if its lengthy use paragraphs

I’m not incredibly knowlegeable with diesels, but my first thought is o2 sensors. Does diesels have these sensors?

yeah, we do need more info.

My guess is a coolant temperate sensor is out and your truck does not know when the engine is cold.

If this is a modern truck, then you should be getting a CEL and a indication of a sensor error.

Is there a lot of white smoke from the exhaust while it is warming up?

The first thing I would check on a cold start problem with a diesel is the glow plugs and their circuitry. So far I have not seen an O2 sensor on a diesel engine. Diesels run with excess air so getting a stociometric fuel air ratio or complete oxygen comsumption of the cylinder charge can only happen at maximum torque.

Hope that helps.