Trescothick shared an opening stand of 48 with Arul Suppiah, who was caught and bowled by Liam Plunkett to signal the beginning of a second-wicket partnership of 84 between the Somerset skipper and Compton.
Trescothick fell to Harmison shortly after a short break for rain, with Compton trapped lbw by the same man soon after.
Craig Kieswetter could only contribute 10 before he swiped across the line to Chris Rushworth, but Peter Trego (33 not out) and James Hildreth (31 not out) combined for an unbroken stand of 46 that took Somerset to the close.
BBC Radio Newcastle's Martin Emmerson: "Somerset go into day three of their final match of the season top of the table and with everything falling into place to help them win their first title.
"It seems they could do it just like Durham did two years ago, gaining the points they need while watching Notts slip up.
"Their hopes of maximum batting points may prove to be just that, as no side has managed that at Chester-le-Street all season. Still plenty of cricket left in this one."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.