The funniest thing about a celebrity “hall pass” is that nobody expects to use one.

It is a relationship joke built on impossibility: pick the famous person you would be allowed to sleep with, laugh about the odds, and move on. David Wain’s Gail Daughtry and the Celebrity Sex Pass begins by asking what happens when the impossible part disappears.

Gail Daughtry (Zoey Deutch) is a small-town hairdresser preparing to marry her high-school sweetheart, Tom, when an absurd coincidence puts him in the same room as his celebrity pass. He follows through. The technical defense — that Gail once gave him permission — is exactly as useless as it sounds once a hypothetical becomes an actual betrayal.

So Gail decides to balance the equation.

Her choice is Jon Hamm.

That sentence gives Wain and co-writer Ken Marino almost everything they need for a 93-minute comedy: a wounded but determined Midwesterner, an unattainable movie star, and Los Angeles as a city where irrational plans can begin to feel plausible if you meet enough strange people. Gail travels west with her best friend Otto (Miles Gutierrez-Riley), and the movie gradually assembles a traveling party around her: a desperate aspiring agent played by Ben Wang, Marino’s down-on-his-luck paparazzo, and eventually John Slattery playing a wonderfully diminished version of John Slattery.

The structure is intentionally familiar. Wain has built the trip as a warped Wizard of Oz, replacing the yellow brick road with Hollywood Boulevard and the mysterious man behind the curtain with Jon Hamm. Even Otto’s name makes the joke obvious. Gail keeps collecting companions who each believe Hamm can solve something for them, while Sabrina Impacciatore’s extravagantly threatening Ludovica provides the closest thing this loose screwball adventure has to a Wicked Witch.

It is a very good organizing idea because Wain has never been especially interested in realism. Wet Hot American Summer and They Came Together worked by identifying the grammar of a genre and then behaving as though every cliché inside it had been written by someone who had never seen a human being interact. Gail Daughtry operates on the same wavelength. Characters accept insane developments with barely a pause. Celebrity cameos are treated as both miraculous and ordinary. A talent agency can become a temple. Hollywood itself feels less like a city than a collection of anecdotes people tell after three drinks.

The problem is that this time the target is less precise.

The movie is sending up celebrity culture, marriage, revenge fantasies, entertainment-industry desperation, movie-star mythology and old-fashioned quest narratives all at once. Individual jokes can be terrific, but they are not always pushing in the same direction. Wain’s best comedies create the sensation that every stupid detail belongs to one larger stupid idea. Gail Daughtry sometimes feels like a sketch packet tied together by airfare.

Deutch is what prevents the movie from floating away.

She plays Gail with almost no irony. That choice matters. A more self-aware performance would turn the character into another joke about provincial innocence, but Deutch gives her a sincerity sturdy enough to survive Wain’s nonsense. Gail is genuinely hurt by what Tom did. She is also genuinely convinced that sleeping with Jon Hamm might somehow restore order to her relationship. Deutch does not ask the audience to believe the logic. She asks us to believe Gail believes it.

That distinction carries entire scenes.

Ken Marino, Ben Wang, Miles Gutierrez-Riley, John Slattery and Zoey Deutch look upward together inside a brightly decorated room.
Wain surrounds Gail with characters who all have their own increasingly desperate reason to find Jon Hamm. Image: Sony Pictures Classics

The supporting cast understands the assignment. Ben Wang has a frantic eagerness that makes his would-be agent funny before the script gives him a punch line. Marino plays professional humiliation with the confidence of someone who has spent decades finding new variations on it. Gutierrez-Riley provides the closest thing the group has to emotional ballast.

Slattery gets the richest joke.

Playing himself as a man whose cultural peak has left him stranded in the shadow of his former Mad Men co-star, he turns self-parody into something almost mournful. Every mention of Hamm lands like a fresh insult. The performance is ridiculous, but Slattery gives the ridiculousness a tiny bruise of truth. Hollywood is full of people whose proximity to someone more famous becomes the first fact others remember about them.

That idea is more interesting than the movie ultimately needs it to be.

Wain is happiest moving to the next bit. Some of those bits land beautifully. Others arrive, announce themselves and disappear before they have accumulated enough comic pressure. The hit rate is good rather than great, which matters in a movie built almost entirely around the expectation that another joke is coming.

The Los Angeles setting helps. Kevin Atkinson photographs the city with a bright, slightly unreal sheen, turning familiar streets, offices and hotels into Gail’s Emerald City. She arrives expecting movie stars and receives an ecosystem of assistants, photographers, washed-up actors, hustlers and people who know somebody who knows somebody. The movie’s best running joke may be that Jon Hamm becomes more mythological the closer Gail gets to him.

There is also something pleasantly old-fashioned about watching an R-rated studio-adjacent comedy commit this completely to silliness. Gail Daughtry is not designed around franchise maintenance or intellectual property. Its title is too long. Its plot is ridiculous. Its cast seems to have been assembled partly on the assumption that funny people are funnier when allowed to stand near one another.

That freedom is worth protecting.

It just does not automatically make every detour worthwhile.

By the time Wain begins pulling the quest together, the movie has generated more affection than momentum. Gail remains likable, the ensemble remains game, and there are enough sharp lines and genuinely strange turns to keep the experience buoyant. But the premise promises something cleaner and more dangerous than the film delivers. What begins as a wonderfully simple question — can revenge sex with Jon Hamm save a marriage? — becomes a crowded Hollywood adventure that occasionally forgets the emotional absurdity that made the question funny in the first place.

Gail Daughtry and the Celebrity Sex Pass is at its best when it trusts Deutch to stand in the middle of nonsense and treat it as a serious problem.

Hollywood already knows how to make itself ridiculous.

She gives the movie someone worth following through it.