Armed with effectively an all-new car after his Turn 6 crash in the deluge that ended Saturday's race prematurely, Cassidy worked his way to the final once more to take on da Costa - in a battle between Formula E's most recent polesitters.
In the opening corners, the New Zealander bagged a healthy advantage, which translated to 0.09s in his favour by the end of the first sector.
That advantage grew with each sector, and thus handed Cassidy a session-best lap of 1m08.584s to clinch a clean sweep of poles in Brooklyn.
But after the session, Cassidy dropped to the bottom of the timing boards with a 30-place grid penalty, having changed his battery pack and cooling amid the repairs to his car.
Cassidy had breezed past Andre Lotterer to reach the final, following the German's increasingly scruffy lap, which featured a slide at Turn 6 that eventually culminated in a 1.6s deficit to the Envision driver.
The semi-final between da Costa and Alexander Sims was altogether far closer and, despite Sims's lock-up into Turn 1, the Briton ended the first sector fractionally ahead.
Da Costa hit back to lead the second sector by a scant 0.003s, meaning that the eventual 0.15s advantage that carried the DS Techeetah driver to the final was all produced in the final sector.
Sims hence starts Sunday's race in second - after Cassidy's penalty - through his 1m08.830s lap, as Lotterer was comparatively slow with a 1m10.420s.
After topping his group, Sergio Sette Camara ran Lotterer close in their quarter-final duel and had the upper hand by a fraction at the end of sector 1, but Lotterer's better middle sector gave the Porsche driver enough to get through at the Dragon Penske racer's expense.
Cassidy made his way past Stoffel Vandoorne as they battled for a semi-finals place, picking up an early advantage and letting it grow as Vandoorne took too much kerb at Turn 12/13 to end his hopes of making it into the top four.
Da Costa was 0.002s behind Nyck de Vries at the end of the first sector, but the Dutchman then got a little wayward on the Turn 6 kerb and shipped almost two tenths to the Portuguese driver - which proved to be insurmountable by the end.
But the biggest surprise of the quarter-finals was Sims's victory over Mitch Evans in their duel, with the Mahindra driver's first sector proving to be enough to keep him ahead despite the Kiwi going quicker in the latter two sectors. The two were split by just 0.006s.
Sette Camara's time was the best out of those eliminated, producing an eventual fourth-place grid slot for the race with Vandoorne, Evans and de Vries behind him.
For the second day in a row, championship leader Edoardo Mortara was unable to progress from the group stage - having been unable to set a lap within the first six minutes of the session owing to brake-by-wire issues.
Jean-Eric Vergne hit the wall on the exit of Turn 13 and thus ended his chances of progression too, as Robin Frijns made a similar error and could not join team-mate Cassidy into the final eight.
Practice leader Sam Bird also failed to make the cut, finishing 10th in the group after having to evade Vergne at the close of the session - which became ninth after Pascal Wehrlein had his laps deleted for overusing power.
Lucas di Grassi also had his best two laptimes deleted for failing to respect the mandatory minimum pit in/pit out time of 100 seconds - and thus had his headline time removed and was relegated to 10th in Group B.
This reinstated Lotterer into the top four, with Jake Dennis just on the cusp while Antonio Giovinazzi grabbed sixth in the second group.
Following Cassidy's demotion, Oliver Askew starts eighth ahead of Avalanche Andretti team-mate Dennis, while Frijns heads Giovinazzi.