Alex Hughes (103) hit his first Specsavers County Championship century of the summer, but Glamorgan closed with a commanding lead of 122 runs heading into the final day at Swansea.
Hughes batted confidently and resolutely and Matt Critchley added an unbeaten 54, but Derbyshire lost five wickets for as many runs and were bowled out for 362 with a lead of 79.
Three early wickets lifted Derbyshire, but Usman Khawaja (79 not out) and Kiran Carlson (69 not out) settled and the Glamorgan deficit soon became a lead which they will look to build on in the morning.
The overnight batsmen started steadily on Day Three and Hughes progressed from 67 to reach his first century of the summer off 180 balls, brought up with his tenth four.
However, he lost his batting partner in the same over, Godleman lbw for 24 to end a stand of 82 which had reduced the deficit to just 26 with six wickets remaining.
Hughes’ fine and determined innings came to an end on 103, run out, bringing together Gary Wilson and Matt Critchley and an opportunity for two new batsmen to build a lead for Derbyshire.
Returning from a Twenty20 Tri-Series with Ireland, Wilson looked composed as he built his innings, whilst Critchley scored around the ground as the lead past 50.
The young all-rounder reached his half-century off 91 balls, with four fours, but Wilson (44) was run out in the same breath, the pair chancing a second to an overthrow and the wicketkeeper-batsman short of his ground.
The mix-up in the middle was the first of four wickets in 18 balls, as Tony Palladino, Hamidullah Qadri and Duanne Olivier were all dismissed without scoring.
Debutante Prem Sisodiya finished with his first three first-class wickets, Ravi Rampaul the last man out having survived two overs.
Critchley was unbeaten on 54 as Derbyshire were all out for 362 to set a first innings lead of 79, but the visitors would have aimed to post more having been 357-5.
Nick Selman and Jack Murphy started solidly for Glamorgan, who reached 44 in the 12th over before Qadri got the breakthrough and dismissed Murphy lbw for 27.
The 17-year-old off spinner had his second soon after tea and Critchley also claimed one as Derbyshire took two wickets in as many overs to leave Glamorgan three down and still trailing by 31.
But the experienced Khawaja and the 20-year-old Carlson set about rebuilding the Glamorgan innings and steadily built a lead in a partnership which now gives Glamorgan the upper-hand in this match.
Vitality Blast is back! Derbyshire Falcons host seven Twenty20 games this July and August. Purchase your tickets in advance and save from £4. Buy online or call 01332 388 101.