hi guys.
i recently got my engine rebuilt. its auto transmissin.. the main bigen baring was makng noises bcuz of low oil so i got it rebuilt.
pistons were changed and bigen barings, gasket, oil pump etc. i took the parts to the lathe machine guys and they said the vavles are fine they will just need griniding and will be fixed. engine has been fited back in the car now. car runs very smooth and soundless..

THE ISSUE
when i start the car in the morning. it gives a very rough idle. the rpm goes hi when i start and sudenly comes down slowly and goes below 1000 and car shakes vibrates. if i put that is d2 with the brakes on the car shakes alot. when i run The brakes dosent work properly at that time either. Got the ecu reset as well. it didnt work out. after runing the car for 10 mins. it goes fine totaly. no stalling issue brakes work fine as well. i also got the throttle refreshed as wel

Could you help me out? could it be a software issue or a mechanical issue? im expecting valves?
cud it be?