1999 volvo s70 t5

My '99 volvo s70 t5 with 132k miles is idling poorly causing the car to shake, and the mechanic who looked at it said I am not getting compression in cylinder #5. He recommends a valve job (not sure if it is the intake or exhaust valve but said 95% of the time that is the issue). The mechanic said they completed the compression test, and that is what told him it was cylinder #5. Cost is 3200-3500 for the repair.

Please advise as to whether this is the correct recommendation, and if the price is accurate. Given the age and mileage on the car, I am reluctant to invest 3-4k. Thank you!

I am not a car expert, but I had a similar problem with a '98 Honda CRV last year. I kept getting mysterious check engine codes. After several attempts to fix the problem, which got worse as time went on, I tried adjusting the valve clearance. By that point it was too late, and didn’t help (wish I’d known earlier). My mechanic recommended taking it to the dealer and paying $$ to them to run their battery of tests. That’s when they uncovered the bad compression in one of the cylinders (and showed me the compression test–I’m skeptical about mechanics at the dealer). They gave me an estimate for the repair similar to what you got (maybe more like ~$2500), saying it needed either a valve job or a new engine–my choice.
Given its age and mileage (over 200k I think) I just decided to jump ship and start over. I sold it to someone who could repair it themselves, and we were both pretty happy about it. I got a pretty good price for a car that needed a new engine, and they were happy because it was still running and didn’t need to be towed.