MASSACHUSETTS LAWMAKERS SUSPENDED their rules and went beyond their midnight end-of-session deadline, but still they couldn’t finish all the work they had planned to do.

The House adjourned at 1:12 a.m. Wednesday and the Senate ended its session at 1:20 a.m. When the dust settled, the two chambers had approved bills dealing with opioid treatment, economic development, and clean energy. They also restored millions of dollars of earmarks that Gov. Charlie Baker had pared from the state budget (which was weeks overdue), passed a slew of seemingly routine land takings and easements, and took a largely symbolic vote in favor of a pilot project to test whether variable tolling could reduce road congestion.

But lawmakers couldn’t come to agreement on two of the biggest issues facing the state — how to address inequities in the way hospitals are compensated in Massachusetts and severe and growing disparities in local education funding. The legislators gave near-final approval to a bill strengthening the state’s animal cruelty laws, yet failed to complete work on a kick-the-can bill that would maintain for another year the status quo on horse-racing and simulcasting. As a result, races this week at the Plainridge Racecourse in Plainville and at Suffolk Downs may have to be postponed.

House and Senate leaders patted themselves on the back as they wearily went home to bed, but the fact is it wasn’t a pretty sight. Long-simmering tensions between the two branches surfaced over alleged brinkmanship by the House and the behind-the-scenes influence of powerful lobbyists. (Former state senator Ben Downing offers an outside-the-building perspective.)

Sen. Sonia Chang-Diaz, who was trying to negotiate an education funding deal, told the State House News Service that House leadership rejected all of the Senate’s compromise proposals, “moved the goal posts, and then killed the bill completely, stunningly, by rejecting one of their own proposals.”

On health care, the Senate passed its legislation last November but the House waited until late June. Both branches wanted to financially stabilize struggling community hospitals, but they couldn’t agree on the best way to do it. “It was clear that Partners and the Massachusetts Hospital Association were making the calls and we couldn’t accept that,” said one senior Senate official, according to State House News.

The Senate also had to accept far less than it wanted in a clean energy bill, as House negotiators adopted the go-slow approach favored by the state’s utilities and business groups. Sen. Jamie Eldridge of Acton voted for the final legislation, but said on the Senate floor that he was disappointed it was not bolder and more comprehensive. “We need to do a better job standing up to the utilities and the fossil fuel industry,” he said.

The Legislature spent a lot of time over the last two days restoring all the earmarked funding for local projects that Baker had cut from the budget. Lawmakers also rejected an amendment Baker had filed to the budget calling for a study of ways to reduce road congestion rather than a pilot project to test whether lower tolls could entice drivers to commute at off-peak periods. The Legislature’s action was largely symbolic because Baker can veto the pilot project and lawmakers, now out of session, can’t do anything about it.

Bruce Mohl oversees the production of content and edits reports, along with carrying out his own reporting with a particular focus on transportation, energy, and climate issues. He previously worked...