the lamba sensor detects the amount of oxygen in the exhaust which tells the ecu which the decides whether to put more fuel in more air into the cylinders or more of both . if this s giving a wrong reading the ecu will be putting the wrong amounts of fuel and air into the cylinders causing bad idling and unable to stay running when cold. the perfect fuel to air mixture is 14.7 : 1 if your is doing 5 : 1 it will not run right as there is far far too much fuel in the cylinders my friends car had this problem it took us hours and we swapped loads and it turn out to be a dodgey lamba sensor kurt