The coffee rush. The lunch rush. The columns of headphone-equipped tech workers rushing in and out of train stations. The lanyard-wearing visitors who crowded the sidewalks when a big conference was in town.There was a time three years ago when a walk through downtown San Francisco was a picture of what it meant for a city to be economically successful. Take the five-minute jaunt from the office building at 140 New Montgomery Street to a line-out-the-door salad shop nearby.The 26-story building, an Art Deco landmark that was once the tallest in the city, began its life as the headquarters for the Pacific Telephone & Telegraph Company. Decades later, it served as the home of the local search company Yelp. The nearby salad store was part of a fast-growing chain called Mixt.Yelp and Mixt had little more than proximity in common, which at that time was enough. Yelp was an idea that became billions of dollars in value on the internet. Mixt was a booming business serving lunchtime salads to the workers who traveled on electrified trains and skateboards to their jobs in downtown cubicles.Their virtuous cycle of nearness, of new ideas becoming new companies, feeding other ideas that become other companies, was the template for urban growth.Businesses like Yelp took root in the high-energy, high-density city; chains like Mixt flourished alongside them as their workers ventured out for lunch. As downtowns have emptied out, their once-symbiotic relationship is coming undone.âThis area was always packed with people,â recalled Maria Cerros-Mercado, a Mixt manager who built her career in food service downtown. âPeople would get off the BART, buy coffee, buy this, buy that. There was always just so much walking.âToday San Francisco has what is perhaps the most deserted major downtown in America. On any given week, office buildings are at about 40 percent of their prepandemic occupancy, while the vacancy rate has jumped to 24 percent from 5 percent since 2019. Occupancy of the cityâs offices is roughly 7 percentage points below that of those in the average major American city, according to Kastle, the building security firm.Yelp had its offices in this 26-story building at 140 New Montgomery Street in San Francisco but left after the pandemic began.More ominous for the city is that its downtown business district â the bedrock of its economy and tax base â revolves around a technology industry that is uniquely equipped and enthusiastic about letting workers stay home indefinitely. In the space of a few months, Jeremy Stoppelman, the chief executive of Yelp, went from running a company that was rooted in the city to vacating Yelpâs longtime headquarters and allowing its roughly 4,400 employees to work from anywhere in their country.âI feel like Iâve seen the future,â he said.Decisions like that, played out across thousands of remote and hybrid work arrangements, have forced office owners and the businesses that rely on them to figure out whatâs next. This has made the San Francisco area something of a test case in the multibillion-dollar question of what the nationâs central business districts will look like when an increased amount of business is done at home.âImagine a forest where an entire species suddenly disappears,â said Tracy Hadden Loh, a fellow at the Brookings Institution who studies urban real estate. âIt disrupts the whole ecosystem and produces a lot of chaos. The same thing is happening in downtowns.âThe cityâs chief economist, Ted Egan, has warned about a looming loss of tax revenue as vacancies pile up. Brokers have tried to counter that narrative by talking up a âflight to qualityâ in which companies upgrade to higher-end space. Business groups and city leaders hope to recast the urban core as a more residential neighborhood built around people as well as businesses but leave out that office rents would probably have to plunge for those plans to be viable.Below the surface of spin is a downtown that is trying to adapt to what amounts to a three-day workweek. During a recent lunch at a Mixt location in the financial district, the companyâs chief executive, Leslie Silverglide, pointed to the line of badge-holding workers and competition for outdoor tables. It was also, she noted, a Wednesday â what passes for rush hour. On Wednesdays, offices in San Francisco are at roughly 50 percent of their prepandemic levels; on Fridays, theyâre not even at 30 percent.A park in downtown San Francisco. On any given week, office buildings are at about 40 percent of their prepandemic occupancy.The lunchtime business downtown is not, and may never, be what it used to be. But if workers arenât going to return to buying their $17 salads downtown, Mixt will follow them home.Which is why on a recent Wednesday morning, one of Mixtâs managers, Ms. Cerros-Mercado, 35, stood on a mostly empty sidewalk waiting for an Uber (another company that told most of its employees they can work half their time from home).More on CaliforniaBan on Flavored Tobacco: The Supreme Court refused to block a California law banning flavored tobacco, clearing the way for the ban to take effect.L.A.âs New Mayor: Vice President Kamala Harris swore in Karen Bass as the first female mayor of the nationâs second-largest city in a ceremony that celebrated her historic win but also underscored the obstacles ahead.Employee Strike: Postdoctoral students and academic researchers at the University of California said that they would return to work, partly ending a weekslong strike to demand higher pay. Some 36,000 workers remain on strike.A Piece of Black History Destroyed: Lincoln Heights â a historically Black community in a predominantly white, rural county in Northern California â endured for decades. Then came the Mill fire.Ms. Cerros-Mercado lives in San Francisco and used to walk downtown for work but now manages a Mixt branch in Mill Valley, a Marin County suburb that has 14,000 people and $2 million starter homes.Many of the former office workers who live there have yet to return downtown en masse, but their purchases over the past three years have shown that they still want downtown perks and services like a freshly prepared lunch. Mixt opened the Mill Valley location this year as part of a push to generate more business in residential neighborhoods and suburbs.Just before 7:30 a.m. on that recent Wednesday, Ms. Cerros-Mercado watched her Uber pull up outside a downtown Whole Foods so she could start her commute to the suburbs. It proceeded along the sleepy streets where she used to work â past coffee-shops and dim sum restaurants, past the glass towers and the boarded-up storefronts â and sped across the Golden Gate Bridge toward Marin.The Creative ClassAs it happens, Yelp was inspired by a flu.Mr. Stoppelman, 45, contracted the virus shortly after returning to the Bay Area from business school. This was in 2004, back when the internet had enough information that you could find something about anything, yet was also still new enough that the information was rarely more detailed than what you could find in the Yellow Pages. When Mr. Stoppelman went online to find a doctor and was confronted by a bunch of phone and suite numbers but little about the actual physicians, it gave him an idea.Jeremy Stoppelman, chief executive of Yelp, decided to allow its 4,400 employees to work from anywhere in the country.Aaron Wojack for The New York TimesYelp began as a word-of-mouth email service before morphing into the local review and directory site that is now worth about $2 billion. That he had a good idea was less important to the companyâs success than the Bay Areaâs tech ecosystem â the experience and social connections Mr. Stoppelman gained from his previous job at PayPal helped him procure $1 million in start-up funding.Another factor, Mr. Stoppelman said, was a crucial decision, unusual at the time, to locate the company in a San Francisco office building instead of a Silicon Valley office park.âIâm not sure that Yelp would have succeeded if we werenât in the city,â he said. âWhen youâre in a city, thereâs lots of places you might go, and an efficient way to sort through the possibilities is important. Yelp was a killer app for the city.âSan Francisco is about 40 miles from the heart of Silicon Valley, which for the most part consists of low-slung suburban cities that sit along U.S. 101 and have sprawling office campuses surrounded by acres of parking. Until fairly recently, however, the city was considered a subpar place for start-ups.The downtown business district had historically revolved around banks and insurance companies. And the wave of tech companies that sprouted up in San Francisco during the dot-com boom of the late 1990s became symbols of that periodâs delusions when they went out of business during the dot-com bust. Mr. Stoppelman said the surplus of fly-by-night companies gave credence to a joke that circulated around PayPal: Start-ups do better in the suburbs because their workers have less to do outside the office.But the bust provided an opportunity in the form of cheap office space that proliferated through the cityâs South of Market neighborhood, which sits next to the financial district. Besides, for a new generation of start-up founders like Mr. Stoppelman, who was in his 20s and single when Yelp started, the city just seemed more fun.In San Francisco, and around the country, a growing preference for urban living was showing up in surveys, condo prices and pour-over coffee shops. Economists like Edward Glaeser at Harvard and Richard Florida at the University of Toronto distilled this movement into a sort of new urban theory that said cities were benefiting from several converging trends, including a more tech-driven economy, plunging crime rates and the bubble of young millennials entering the work force.Downtown San Francisco in December. Until 2020, the area was packed with people.In his 2002 book, âRise of the Creative Class,â Mr. Florida posited that instead of seeking lower taxes and operating costs or locating near suburban enclaves with good schools, companies like Yelp were sprouting in cities rich with the design and engineering workers their businesses needed to grow. He parlayed the bookâs success into a consulting firm, the Creative Class Group, which advises cities on strategies for attracting young workers.The advice â find educated workers, create dense fun neighborhoods and embrace social liberalism â could be reduced, effectively, to âbecome more like San Francisco.âAn irony of San Franciscoâs emerging status as an economic bellwether was that until the Great Recession, when a plunge in tax revenue prompted the local government to go scrambling for ways to stimulate growth, the city had made no special effort to attract tech companies. In the wake of the downturn, however, the city altered its tax code to be more welcoming to start-ups, while office owners started offering the shorter leases start-ups desire and open floor plans that allow companies to cram more people together.Less than a decade later, a city that was never more than a Silicon Valley satellite was the epicenter of a new boom, with companies like Twitter, Lyft, Uber, Dropbox, Reddit and Airbnb all setting up inside the city limits. And the employees who worked there needed lunch.Ms. Cerros-Mercado, who grew up in the city, watched this unfold while building her career at Specialtyâs, a local cafe and sandwich chain known for its giant cookies. She started working there for about $10 an hour and regarded it as a stopping off point that would help support her children as she went through college, with the hopes that she would later go to nursing school.But she came to like it and rose from being a cashier to a kitchen manager and then general manager who made $80,000 with time off, along with dental and health benefits. The main location where she worked was downtown, next to a Mixt restaurant whose lines spilled onto the street.The Creative Class and Its DiscontentsEmpty seats at a restaurant in downtown San Francisco, perhaps the most deserted business district in America.For the optimized office worker looking for the trifecta of fast, healthy and filling, few meals are more efficient than a pile of veggies and some dressing swirled with tofu or grilled chicken. Unfortunately, the aspirations of a salad are often dashed by the difficulty of making one that is actually good. The ingredients come from every corner of the supermarket, and if they arenât combined in the right proportions, or if they are made too far in advance, every bite is a drag.Ms. Silverglide, 42, the chief executive of Mixt, tried to solve this problem with a setup in which customers proceeded down a counter and called out ingredients like grilled chicken and roasted brussels sprouts while stipulating exactly how much dressing they wanted. She said the naysayers of the time told her that there werenât enough salad eaters to sustain her company, or that only women would eat there.Instead, lines extended down the block, and Yelpâs users gave the business three and a half stars. People like Mike Ghaffary discovered a healthier kind of lunch in a restaurant where customization was encouraged.Mr. Ghaffary is a former Yelp executive and serial optimizer who went to Mixt in search of a vegan meal that was high in protein and low in sugar. The salad he came up with paired lentils, chickpeas and quinoa with greens and a cilantro jalapeño vinaigrette.Over the next several years, as Yelp grew and went public, Mixt thrived alongside it, adding a dozen locations through downtown and other city neighborhoods. Mr. Ghaffary became something of a Mixt evangelist (âHe was very proud of the beany salad he came up with,â Mr. Stoppelman said) and ordered his vegetal concoction so frequently that the salad was added to the permanent menu and still sits on the board under the name âBe Well.âIn the city, however, well-being was taking a hit.The tech companies that San Francisco had tried so hard to attract were now the target of regular protests, including some by demonstrators who at the end of 2013 began blocking commuter buses from Google and other companies to show their rage at rents that now sit at a median of $3,600. This was an opening gesture in what would become an ongoing debate about gentrification and the effect of tech companies on the city â a debate that played out in arguments over homeless camps, votes to stop development and countless more protests.All of this was rooted in the cost of housing, which had been expensive for decades but had morphed into a disaster. A local government that had all but begged tech companies to set up shop there was now pushing a raft of new taxes to deal with its spiraling affordable housing and homelessness problems. In 2017, the year the Salesforce Tower eclipsed the Transamerica Pyramid as the cityâs tallest skyscraper, Mr. Florida published another book. It was called âThe New Urban Crisis.âRamps to the Salesforce Transit center in San Francisco. The vacancy rate for downtown offices has risen to 24 percent from 5 percent since 2019.An axiom of the post-Covid economy is that the pandemic didnât create new trends so much as it accelerated trends already in place. Such is the case with Yelp, which long ago started moving employees in response to San Franciscoâs rising cost of living, opening sales offices around the country and new engineering hubs in London and Toronto.Still, it was hard to see how that might pose any kind of threat to the city, whose greatest challenge seemed to be dealing with the too many jobs it already had.Expansions aside, Yelp was still ensconced in its headquarters at 140 New Montgomery, and by early 2020, it had every intention of signing a new lease. The companyâs ties to San Francisco, the hold of the creative class and all that, were too strong to imagine anything in its place.Headquartered in the CloudâHave you heard about Covid?âMs. Cerros-Mercado remembers asking a regional manager at Specialtyâs that question sometime in February or early March of 2020. The virus had been in the news for weeks, but it didnât seem like more than a seasonal bug until her 19-year-old daughterâs school trip to Spain was canceled. The manager she asked wasnât so sure.âHeâs like, âOh, itâs just a flulike virus; it will go away,â she said. âAnd Iâm looking at him and telling him, âNo, this is actually really serious.ââMs. Cerros-Mercado described the following weeks as a blur of plunging sales and eerie moments like standing in a coffee shop with no customers or hearing from a janitor that the offices above them were clearing out. By May, Specialtyâs had filed for Chapter 7 bankruptcy after a conference call in which she and other managers were thanked for their service and told they would be employed for three more days, during which they would deliver the news they had just received to the people who worked for them.âOne of the hardest conversations was having to talk to my team,â she said. âI had some team members that were crying because they werenât sure where their income was going to come from.âIn that moment, the question was when life would return to how it was. But as Mr. Stoppelman discovered that he could run a publicly traded company from his home with no loss of business, he decided that for his company, anyway, the new normal was better. Yelp abandoned its headquarters when the lease at 140 New Montgomery lapsed, joining a growing list of tech companies that had replaced free cafeterias and Ping-Pong breakrooms â which for more than a decade had been rationalized by a belief that a social company was a more innovative company â with slogans like âheadquartered in the cloud.âYelp ended up adding back about 50,000 feet for employees who want an occasional desk, but for the city that figure is even smaller than it seems. The new offices are one-third of its former footprint; Yelp subleased the space from Salesforce â the cityâs largest private employer, which is also cutting back on local offices.The emptying of American downtowns after Covid was followed by a boom in exurban housing and in cities like Austin and Spokane, trends reflected in where Yelpâs work force has landed. Cortney Ward, 41, a Yelp product designer, bought a home in Austin after leaving her one-bedroom apartment in San Franciscoâs Nob Hill. Yelp workers also invented new habits and left holes in the businesses that relied on them. When Diego Waxemberg, 30, a software engineer, left the Bay Area for Charlotte, N.C., he started lunching on leftovers instead of sometimes buying a $17 Mixt salad with tri-tip steak. Mackenzie Bise, 30, who works in user operations, moved to the Sacramento area, and during a recent online search discovered that her favorite San Francisco lunch spot had gone out of business.Maria Cerros-Mercado preparing the Mixt salad shop in Mill Valley to open for the day.During the height of the pandemic, Ms. Cerros-Mercado went through a spell of unemployment before landing at another restaurant chain and later at Mixt. But downtown business was still somewhere between lagging and nonexistent. Mixt laid off hundreds of workers, closed most downtown stores for more than a year and subsisted on business from neighborhood and suburban stores.âIf we didnât have the neighborhood restaurants, we wouldnât have survived â point blank,â Ms. Silverglide said.But for all the daily rhythms that were upended by home offices, the desire for a specially prepared lunch seems to have endured. Consider Mr. Ghaffary, creator of the Be Well salad, who used the pandemic as a challenge to recreate Mixtâs setup in the kitchen of his Marin County home. He started with fresh ingredients but got tired of his frequent trips to the grocery store and shifted to preparing them in bulk.âIâd make like four or five days of Tupperware,â he said. âFirst I tried making the whole salad, and then it would get soggy. Then I made half the salad and would finish the rest at the end.ââI was very proud of my streamlined production methods,â he continued. âAnd then I was kind of like, âI donât want to be making these salads.ââMr. Ghaffary told this story over salad at Mixtâs Mill Valley store, the one Ms. Cerros-Mercado manages, which opened in July and had lines of customers in athleisure. Operations are slightly more difficult because some employees commute an hour or more to get there, most relying on buses and one sometimes trying to catch a ride in Ms. Cerros-Mercadoâs Uber. When a worker misses the bus, Ms. Cerros-Mercado spends her morning trying to cover for holes in the setup line.But the business was steady, and according to Ms. Silverglide it extends until 9 at night, catering to families and a growing salad-for-dinner segment that pairs plates of greens with the various wines and craft beers recently added to the menu. She is fairly confident that Mixtâs âneighborhood locations,â like the Mill Valley one, will drive the businessâs expansion. Business in downtown San Francisco has been picking up â but itâs unclear how long that will last, or how close to prepandemic traffic it will ever reach. The offices, after all, havenât even hit 50 percent.Better TogetherThe building at 140 New Montgomery Street is empty but still an Art Deco landmark.A wood reception desk that used to greet Yelpâs visitors sits empty in its former office. The mounted iPad where visitors once checked in is gone, along with the bright jars of candy and the rows of desks that sat beyond them. But there are still views.âYou can see that you get good natural light all around,â said Stacey Spurr, a regional director for Pembroke, which owns 140 New Montgomery, during a recent tour of the quiet and empty but still quite gorgeous building.Ms. Spurr began the tour by pointing out the gold ceilings in the lobby before proceeding to the basement, where there are showers and bike racks. The empty floors upstairs are layered with boastful stickers like the one about the buildingâs A-plus air filtration system.The nearly 160,000 square feet that Yelp left empty is about half of the buildingâs space, and about half of that has been re-leased. The good news for Pembroke seems less good for the city. Some of the new tenants are finance and venture capital firms that have clung to the gravitas of a physical office for client meetings and the occasional conference but are unlikely to contribute regular foot traffic, according to building owners across the city.In a typical downturn, the turnaround is a fairly simple equation of rents falling far enough to attract new tenants and the economy improving fast enough to stimulate new demand. But now thereâs a more existential question of what the point of a cityâs downtown even is.Downtown San Francisco is trying to adapt to what amounts to a three-day workweek. On Wednesdays, offices are at 50 percent of their prepandemic levels; on Fridays, theyâre not even at 30 percent.The city, and business groups like Advance SF, are trying to reframe the urban core as a more residential and entertainment district that draws from throughout the region and may in the future involve the conversion of office buildings to residential use. The motto is âBetter Together,â and Advance SF recently hosted a forum with a guest economist to discuss new ideas for downtown. The guest was Richard Florida.âWhen I started with the creative class, places didnât care about young people, they were only trying to attract a family with children to the lovely suburbs, and Iâm saying, âNo, no, no, no, no,ââ Mr. Florida said in an interview. âTwenty years later, people forgot about the families. And now hereâs a whole generation leaving cities again, for metropolitan or virtual suburbs.âThe more businesses invest with that new reality in mind, the more likely that reality becomes self-fulfilling.A year after being consumed by bankruptcy, Specialtyâs, the cafe chain where Ms. Cerros-Mercado began her career, was reincarnated. The first new store sits in the Silicon Valley town of Mountain View, and as the company plots its next expansion it is eschewing the office-adjacent locations on which the original company was built for a more delivery-centric business that has a world of half-empty buildings in mind.Back at 140 New Montgomery, the owners are experimenting with new ideas to get office workers to come in. The building has been hosting gatherings like an Oktoberfest celebration that included a raffle to win a beer stein with the buildingâs logo.On the afternoon of the Oktoberfest party, a cluster of workers from a software company stood around eating sausages and soft pretzels.âWe hear a lot of buzz about this building,â said Veronica Arvizu, a senior property manager at the real estate company CBRE. âWe hear itâs the busiest in the city.âA few feet away from her, another group of young workers was playing Jenga. One by one, they took blocks away from the structure, making way for the inevitable collapse. More