when in drive transmission slips to neutral when engine is cold. works fine when engine is warm. is that a major problem. what is the fix and cost

my truck will not stay running unless the pedel is pumped.
i have cked the fuel pump its good, filter is new.
need help.