no overdrive

Car has 283,000 and runs strong. Did the timing belt and new water pump about 7,000 miles ago. What could be causing this problem with the code showing up at random times and only showing 30 degrees when it's hot? It's the OEM green square connector coolant temp sensor that I installed and didn't cure my problem. Detail help would be greatly appreciated.

My clutch was replaced and it will go into all gears except 5th. As for the malfuncton light, it was on prior to fixing the clutch and afterwards it didn't come on. But it came on suddenly when i put the AC on? I don't know if that was a coincidence or maybe it loosened a plug?

I have a '98 VW Beetle TDI manual that is making a loud knocking noise. The noise seems to get louder with acceleration. When I shift gears and the engine winds down the noise continues. I did an oil change on the car and found metal shavings in the oil pan. Someone told me that I would need to replace the motor. Is it possible to repair the problem and not have to get a new motor? Any suggestions would be GREATLY appreciated.