Many of California’s cities and counties, weighed down by mounting retirement and benefit costs, are barely keeping their heads above water. Now the state Legislature is considering an onerous bill that could push some of them under.

AB 1250, introduced by Assemblyman Reginald Byron Jones-Sawyer, D-Los Angeles, aims to stop local governments from contracting out for key services. As written, it is hopelessly ambiguous, but the intent is clear: Increasing the number of public employees, who would be members of unions, rather than looking at outside services that could be more cost-effective.

At this point, it is aimed only at cities and counties operating under general state law, not charter cities such as San Jose and a number of others in Silicon Valley or charter counties like Santa Clara. But it would cover 44 the state’s 58 counties and 361 of its 482 cities.

It would include contracts for everything from engineering and legal services to garbage collection and financial advice.

There are lots of reasons cities contract out service or might want to in the future. Most of them already contract with garbage collectors, for example — specialized work with heavy capital investment. Small cities may be better off contracting with a law firm that offers a range of expertise and services rather than hiring its own city attorney with salary and benefits.

Jones-Sawyer and the Service Employees International Union, the sponsor of the bill, propose a labyrinth of disclosure rules and vague auditing and performance standards designed to drive up the cost and complexity of contracting for services. To further discourage local governments, the bill would make them liable for the contractors’ labor violations or other actions challenged in court.

Some cities already have policies for contracting out work. San Jose has what it calls a competition policy that allows city departments to bid on contracts the same as private companies. The rules were passed when there was a powerful labor-backed majority on the council, and they favor public employees for sure. But at least this was a local decision involving compromise and public debate.

Local government leaders should be free to find the best services for the best price. They shouldn’t have to hire government workers for projects that are temporary or services best provided by the private sector.

Just as state lawmakers want the Trump administration to stop meddling in their affairs, the Legislature should let local governments run theirs. Don’t waste time trying to make sense of the murky AB 1250. Just dump it.