Sussex 402 (Hudson-Prentice 63*, Scrimshaw 5-49) and 193 for 5 (Coles 101*) lead Derbyshire 407 (Guest 105, du Plooy 52, Karvelas 4-64, Shipley 4-124) by 188 runs
The 19-year-old reached the second century of his career six overs before stumps and will resume on 101 with Sussex 193 for five, a lead of 188.
Brooke Guest had earlier become the first Derbyshire wicketkeeper to score a century against Sussex before they were bowled out for 407 to take a first innings lead of five runs.
Off-spinner Alex Thomson, who opened the bowling, then took three wickets as Sussex were reduced to 72 for four before 19-year-old Coles and another teenager – 18-year-old Dan Ibrahim – revived Sussex with 113 for the fifth wicket.
To add to Derbyshire frustrations as their partnership blossomed, George Scrimshaw, who had taken five wickets in the first innings, will be unable to bowl in the rest of the innings for excessive use of short-pitched bowling after sending down three bouncers in his fifth over at Coles.
Ibrahim contributed a valuable 36 to the partnership but Thomson, who was always prepared to give the ball some air, struck for the fourth time after switching ends and finding some extra bounce to defeat Ibrahim’s tentative stroke and find a thin edge.
But Coles stood firm, and looked comfortable against both spin and seam. Strong off his pads and ruthless when the seamers over-pitched, he hasn’t offered a chance and has so far struck 15 fours and faced 179 balls.
With the wicket at the 1st Central County Ground showing little sign of deterioration, Derbyshire will still fancy their chances of a successful fourth innings run chase and Thomson, who had four for 47 from 19.1 overs, could be key on the final day.
Suranga Lakmal had already pinned Tom Clark with the third ball of the innings when Thomson removed Tom Alsop with his third ball, as the Sussex skipper edged to slip.
Thomson then bowled another left-hander Tom Haines with one that turned to beat his defensive shot and after tea he held a smart return catch off Oli Carter’s miscued drive. Sussex were in trouble but the composed Coles steadied the ship.
Earlier, Brooke had progressed to the sixth hundred of his career before he was fifth out for 105.
Brooke had added 108 for the fourth wicket with skipper Leus Du Plooy, who went past 900 runs for the season in his 53 before he was bowled around his legs by off-spinner Jack Carson playing back.
Guest guided Carson wide of slip to bring up his century with his 14th boundary but didn’t make the most of a reprieve when he was put down at second slip by Clark, failing to add to his 105 when he was squared up by Karvelas with the second new ball. Nonetheless it was an important contribution by the 26-year-old, who batted for five hours, 21 minutes and faced 236 balls.
Haider Ali fell to Henry Shipley in the next over and when Anuj Dal feathered an edge to wicketkeeper Carter Derbyshire were still 100 runs behind with three wickets left.
But Thomson and Sam Conners, who made a career-best 34, shared 51 for the eighth wicket before Karvelas returned to remove both batters to catches in the deep. Karvelas finished with four for 64 and Shipley four for 124.