In the end, Amazon seemed unwilling to bend or even to talk in earnest with the community about ways to shape their project. They didn’t want to be in a city where they had to engage critics at all. And it’s a pattern. When Seattle’s City Council passed a tax on big employers to fund the battle against homelessness, the company threatened to stop major expansion plans, putting 7,000 jobs at risk. The tax was rescinded.

Economic power — the kind that allows you to dangle 50,000 jobs and billions in revenue over every metropolitan area in the country — is being steadily concentrated into fewer and fewer hands.

For a generation, working people have gotten more and more productive, have worked longer and longer hours, and haven’t gotten their fair share in return. C.E.O.s are reaping the benefits of that work, while the people actually responsible for it are keeping less and less.

This is no accident. The same day Amazon announced its decision to halt its second headquarters here, it was reported that the company would pay no federal income tax on the billions in profits it made last year. That’s galling, especially at a time when millions of working-class and middle-class Americans are finding that they are getting smaller tax returns this year thanks to President Trump’s tax plan, which has hugely benefited the wealthy.

As the mayor of the nation’s largest city, a place that’s both a progressive beacon and the very symbol of capitalism, I share the frustration about corporate America. So do many of my fellow mayors across the country. We know the game is rigged. But we still find ourselves fighting one another in the race to secure opportunity for our residents as corporations force us into all-against-all competitions.

Amazon’s HQ2 bidding war exemplified that injustice. It’s time to end that economic warfare with a national solution that prevents corporations from pitting cities against one another.

Some companies get it. Salesforce founder and chief executive Marc Benioff threw his weight behind a new corporate tax in San Francisco to fund services for the homeless. In January, Microsoft pledged $500 million to combat the affordable housing crisis in Seattle.