The first to be let go from restaurants, bars and hotels were migrants, who have no protection from social safety nets and can be fired more easily. In the food and beverage industry, many of these foreign laborers are from the Nepali ethnic minority in neighboring Myanmar.

Mr. Khosla set up an online campaign for donations and switched from serving neo-Indian cuisine at his restaurant to the next day churning out meals for out-of-work migrants and, later, poor Thais as well.

Today, the restaurant, in a leafy warren of lanes in residential Bangkok, looks more like a food distribution station at a refugee camp than the native habitat of concassés and sabayons. Chilies dry on a tabletop, while bags of rice are stacked up near the entrance to the urban farm where Mr. Khosla nourishes herbs and salad greenery with recycled rainwater.

“Food is food,” said Vishvas Sidana, the director of food and beverage at Haoma, who trained as a sommelier. “We cook what’s needed.”

Restaurants famously operate with unforgiving profit margins. But Mr. Khosla says an understanding landlord, who waived his rent, and generous customers, who donated to his online campaign, have shielded him from having to fire any of his 32 staff.

Each banana leaf meal from his kitchen costs around 60 cents to make and distribute. To guard against the tropical heat, the food contains chilies and other aromatics that act as natural preservatives, he says. He avoids meat, which spoils easily.