The odd thing about reviewing new television shows — which your film editor is occasionally lucky enough to do — is that you end up binge-watching shows that aren’t intended to be seen that way. Unless you’re reviewing the latest Netflix series, you’re not experiencing a new show the way most hesitant potential viewers will: one episode at a time, once a week, quite possibly resting the program’s DVR-or-not fate on how well its initial outing sits. Yet this massive dump of episodes can have a positive effect, and that’s the case with HBO’s new geopolitical comedy The Brink. It’s a show that starts uncertainly, wearing its influences a bit too starkly, before finding its particular groove and settling in with its characters. It’s a good show, but it takes a minute to get there.

The marquee players are Tim Robbins and Jack Black, who go back a ways — all the way back to the Actors’ Gang theatre group, where Black did some of his earliest acting, and artistic director Robbins gave him his very first film role. Robbins plays Walter Lawson, Secretary of State, who sports a massive ego, a predilection for hookers (and near-death sex fantasies), and something of a drinking problem. Black is Alex Talbot, a foreign service officer stationed at the Islamabad embassy, who finds himself caught up in an in-progress Pakistani coup.

The initial episodes are filled with none-too-subtle echoes of Dr. Strangelove, particularly once the titular brink is approached and writer/creators Roberto Benabib and Kim Benabib start intercutting Lawson and the rest of the cabinet in the situation room with the pair of loopy fighter pilots they’re sending on a bombing mission to Pakistan. The show’s view of cynical, fast-talking, deeply flawed politicos, meanwhile, can make it feel less like a new show than a spin-off of Veep (with In the Loop’s Mimi Kennedy even showing up in a supporting role).

But once the show’s writers and directors (who include Austin Powers’ Jay Roach, Heathers’ Michael Lehmann, and Robbins himself) shake themselves loose of those initial constraints and influences, The Brink begins to hit its stride. Robbins may be playing yet another variation on the boozy, oversexed antihero, but he plays him at exactly the right speed and with the right mixture of smug and smart. (It doesn’t hurt to have Carla Gugino on hand as his wife, who gives as good as she gets.) Black similarly finds the correct note of careerist desperation for his lowly underling, and his reactive line readings, particularly once he’s looking a waterboarding in the face, are priceless. Meanwhile, Aasif Mandvi, as his embassy driver and the closest thing he’s got to a friend, steals scenes by the handful (he’s got a little shake of the head in the pilot episode that lands one of its biggest laughs).

And John Larroquette is priceless in the small but invaluable role of the US Ambassador, a Bible-thumper who approaches nuclear annihilation with a good deal more glee than is appropriate. He also has a small, perfect scene in which he insists Mandvi pray with him for Black’s release — and as Mandvi begins his Muslim prayer, the way Larroquette shows his discomfort by making his prayer louder turns into a beautifully trenchant commentary on a Certain Kind of Christian.

That scene, and others like it, display perhaps The Brink’s most admirable quality: its willingness to actually be about the goddamn terrifying world we live in, to name names and make jokes with more than a tinge of discomfort. Maybe it’s in poor taste for Mandvi to tell Black, of his sister, “You stay away from her or I’ll cut your throat and put it on YouTube,” but the line works; even better is the moment when the cabinet hears the new Pakistani leader’s nutso conspiracy theory about how drones are dropping Israeli-funded, electromagnetic birth control on his country, to which Robbins nervously asks, “We’re not really doin’ that, are we?”

Even five episodes in, there are elements that don’t mesh; they can’t really figure out what to do with the fighter pilots after their initial — very funny — bombing run, and those characters become dead weight (even if they eventually lead to Rob Brydon, and I just can’t tell you why his line “Hands are nature’s forks!” is so funny, but there you are). Yet the plotlines are so tartly intertwined, with such a likably screwball energy, that you end up just kind of going with it; by the time they’re cutting between a Jack Black bike chase and Robbins barking orders while going under the knife for an emergency kidney stone removal, it’s pretty inspired silliness.

The Brink premieres Sunday on HBO.