Knocking noise

My 1999 jeep grand Cherokee with 170000 miles with a straight line 6 cilinder has a knocking noise coming from the valve cover area. It is only present during a cold start and for about 2 to 3 minutes. Once it starts getting hot it stops. The engine runs fine it has lots of power and I do not have any other issues.
Is any one having or had this issue and what was done to solve it. Thanks.

Valve lash adjustment sounds like my first guess, followed by restricted oil flow.

Thanks, can the valve lash be adjusted by removing the valve cover and making the adjustment?
If oil flow problem, is it do to gunk buildup or oil pump. Oil pressure gage looks good.

Yes Valve lash can be checked (i believe in general but not sure on this engine) by removing the valve cover, and that will serve the ability to look at the condition of the oil ports and see if there is any buildup that would interfere with oil flow.

Thank, will check it out.

I don’t think the valve lash is adjustable on the 4.0s. This sounds exactly like a classic case of a hydraulic lifter tick, which the 4.0s are well known for developing. I have basically the same motor in my '02 Wrangler with 211,000 miles on it, and it’s been doing the exact same thing occasionally on cold starts for the past 50-100,000 miles. It’s one of those things you can just live with, short of tearing the motor apart. Just as with yours, my 4.0 runs like a champ, has great power, and achieves exactly the same gas mileage as when it was new. Do some internet searching for “4.0 lifter tick” and you’ll find that this is extensively discussed on the various Jeep forums, with a variety of suggested remedies from oil additives to engine rebuilds–I choose to live with it until something else on my motor wears out (which at this rate could be another 200k). For what it’s worth, the tick is much less frequent now than it was in the 150-175k range. It’s also worse in the winter than the summer.

One easy thing that some people think helps is to make sure you’re using an oil filter with a check valve so the oil doesn’t drain out of the filter when the Jeep sits. In that case, on startup the oil has to first fill the filter before it gets to the top end of the motor. Using only filters with a check valve helps oil get to the top end sooner. I change my own oil and typically use Napa Gold filters, which have the valve. Cheaper filters (e.g., Fram) don’t have a check valve.