At the close of season one of HBO’s Hacks, Ava Daniels, a disgraced young comedy writer forced by her agent to serve the fading Las Vegas comic Deborah Vance, has just blown up her life for a second time. Deborah (Jean Smart) is the Palmetto’s resident Joan Rivers, tougher than buffet sirloin and, much like buffet crab rangoon, only getting more poisonous with age. After a season of enduring Deborah’s verbal abuse as her joke-writing partner, Ava (Hannah Einbinder) draws the line at a literal slap in the face. But she doesn’t simply quit. Like many an ambitious young person before her, she gets drunk and high enough to simulate bold, decisive action and tries to parlay Deborah’s most shameful secrets into a TV writing job.

Then, Deborah apologizes — in a big, beautiful, Vegas kind of way — at the funeral of Ava’s father and invites Ava to join her on the road. Having been shown the door at the Palmetto, Deborah is ready for a tour of smaller rooms in unglamorous flyover cities, laying the foundation for a comeback. Ava accepts despite knowing that her vicious tell-all email is still a sword of Damocles hanging in the ether. As season two opens, there’s only one question on our minds: Will Joe Pesci be making a guest appearance to stick Ava’s head in a vise?

The question for Deborah, as in season one, is whether to hole up in the comfort zone of her badly dated material or, as Ava counsels, to explore the more confessional and authentic material that draws in a 21st-century audience. Deborah, who in Jean Smart’s hands can go in a heartbeat from ingratiating optimism to diva froideur, negotiates her waning clout with a mixture of grace, vulnerability, and grandiose ego defense. If she’s playing state fairs and getting upstaged by calving cows, at least she’s traveling in style in a Van Halen-tier tour bus with a master suite and king bed. Ava rides in a casket-sized bunk with her own sidekick, a tennis ball tube containing half her father’s ashes. Not since The Big Lebowski have cremains been treated with such hilarious disrespect as they are on this journey — but no prizes for guessing that they’ll also occasion some Hallmark moments for our heroines.

Yes, Ava will let her guard down, bond with her tyrannical boss, and confess to her betrayal, all sooner than we might expect. Where’s the conflict, not to mention fun, in that? The fun is that Deborah hangs a new sword over Ava’s head: a not-at-all-kidding lawsuit for violating her nondisclosure agreement. To make matters worse, Deborah doesn’t fire Ava, presumably because she’ll need the money for legal fees. Ava, thus reduced to indentured servitude, is a hangdog, shuffling Sancho Panza to Deborah’s swaggering, entitled Quixote.

Season two makes better use of several minor characters. Deborah’s disappointing, utterly traumatized daughter, DJ (veteran spaz Kaitlin Olson of It's Always Sunny in Philadelphia fame), impulsively married to an MMA fighter, pursues IVF and her mother’s approval. Ava's and Deborah’s agent Jimmy (Paul W. Downs) ends up in an HR nightmare with his assistant, the useless, overconfident, wildly unprofessional nepotism hire Kayla (Megan Statler). The two have some of the best comic chemistry on the show, and they play well with checked-out, deadpan HR director Barbara (Martha Kelly), who traps Jimmy in anger management class (“Russell Crowe is my accountability partner”).

This season has a few slapstick setpieces — an MMA fight that ends with Deborah drenched in blood, a violent outburst in a New Age gift shop — that feel lazy and beneath the show’s writing. There’s a bit where Deborah is dumped by her stalker that was done already, and better, by 30 Rock over a decade ago. A scene where Ava buys a “dumb phone” to keep herself off Twitter and email, and thus out of trouble, is about as timely as Deborah’s jokes about Baby Jessica or the Oklahoma City bombing. Einbinder’s delivery saves a lot of middling material, but the show is more often charming than laugh-out-loud funny, something of a letdown given co-creator Jen Statsky’s legendary work on Broad City.

Still, it works. Like a lot of shows about stand-up comedy, from Crashing to The Marvelous Mrs. Maisel, it’s effortlessly watchable, in part due to the pleasure of sitting in on the creative process. The writing is tight and well-paced, and the show is expertly cast; Laurie Metcalf as Deborah’s gruff bus driver is a great addition. Jean Smart is completely credible as a born superstar. It’s hard to resist watching her contend with demons such as self-love and self-loathing, old age and the lure of the limelight, a fractured family and a co-writer who’s doing double duty as a truth-telling court jester. And she and Einbinder are perfectly matched, the fatalistic screw-up and the hardened pro who wants to teach her the hard way what hard work means.

This isn’t the edgier, hyper-specific comedy of Dave or PEN15, nor can it swing obnoxious physical comedy the way Danny McBride can. It has a corniness problem, not least with its soundtrack. Elton John’s “The Bitch Is Back,” sure, of course, but after a while, we’ve heard too many songs that feel like they belong in a commercial for women’s razors. The real-life version of Deborah Vance wouldn’t be so quick to show weakness, such as telling an underling that she’s deeply afraid of reading bad reviews. Hacks walks a fine line between viciousness and sentimentality, so we notice when the writers reach too greedily for our heartstrings. That stuff has to be earned.

Then again, much of Hacks’s unerring charm is that it’s intended as much for Jean Smart’s contemporaries as it is for Hannah Einbinder’s. That’s why it dramatizes a mother-daughter relationship — not only Deborah’s and DJ’s but also Hannah’s with her own grief-crazed, pyramid-scheming mother (Jane Adams). That’s why it occasionally bombs with one type of audience — so it can kill with another. It is pointedly but never heavy-handedly concerned with intergenerational communication, and if it has to sacrifice some envelope-pushing to play a comfortable middle, so be it. For older viewers, it offers the thrill of watching a young person get hazed and humiliated, for younger ones, the thrill of always knowing better than their elders about self-care, sexual politics, labor practices, and emotional hygiene. And there isn’t a drop of flop sweat in sight.

Stefan Beck is a writer living in Hudson, New York.