John Leguizamo, Emhay Anthony, and Jon Favreau in Chef

As long as this stays loose — just its writer-director Jon Favreau, Bobby Cannavale, and John Leguizamo pretending to run a commercial kitchen during the dinner rush, with Scarlett Johansson slinking around the margins and Dustin Hoffman making the occasional appearance as the know-nothing moneybags behind the culinary goings-on — it’s pretty much golden. (I don’t mean it’s exceptionally valuable, but that it’s completely engaging and entertaining in that family-night-at-the-movies kind of way that it clearly aspires to.) It only gets tedious when it heads into life-lessons territory.

Favreau’s chef character, who stumbles into an accidental Twitter feud after being chastised for his professional stagnation by an influential food blogger (Oliver Platt), quits his job because his boss won’t let him grow creatively. He only regains his mojo when he goes back to operating on a small scale, selling Cuban sandwiches out of a humble food truck. Favreau made a number of creatively unexceptional but increasingly successful Hollywood features before hitting a brick wall with Cowboys & Aliens, so you might expect this film to represent some soul-searching on the part of the auteur, but no — for the most part,Chef insists on the professional integrity of its main character, whose culinary genius has not stagnated (pshaw!) but has simply been held in check by his bosses. All it takes is a quick detour to Miami, where the local culture — exotica! — inspires him to start building magnificent pork sandwiches with the help of his magical Latino (Leguizamo). And, like that, Chef Carl Casper is back, baby!

As formula filmmaking goes, it’s not terrible, but it’s hobbled by a reluctance to deal with anything like the reality of being out of work (Casper does complain about money at one point, but as it turns out he needn’t worry about being gainfully employed because his rich acquaintances are willing to bankroll him) as well as the too-familiar subplot in which the divorced Casper struggles to be a decent dad to his mostly estranged son, who’s along for the ride. In the film’s father-and-son scenes, Favreau comes off as an inexplicably dim-witted variant on Louis C.K.’s tryin-to-be-good Louie, consistently choosing to stomp on the kid’s heart for no good reason other than to force some emotional tension on the way to the inevitable happy ending. And I do mean inevitable — a Robert Downey Jr. cameo sends some voltage through this thing, but otherwise there are no idiosyncrasies, no surprises, and no awareness that Favreau’s Chef is the cinematic equivalent of the kind of tasty but generic menu item that gets its lead character knocked on his ass in the first place.