Late-night hosts had a lot to say Monday about the Democrats’ decision to end the government shutdown – most of it scathing.

Calling it a “world-class collapse,” Jon Stewart criticized the Democrats, not only for capitulating to President Donald Trump and the Republicans, but managing to do so while getting nothing in return.

“I can’t [expletive] believe it,” “The Daily Show” host said several times. “You had the wind at your back, election victories all over the country … You sold out the entire shutdown not to get what you wanted, but for a promise to not get what you wanted later.”

Eight members of the Democratic Caucus, including Maine Senator Angus King and New Hampshire’s Senator Jeanne Shaheen and Senator Maggie Hassan, joined Republicans to end the longest government shutdown in US history. The Democrats did not achieve their goal of extending the Affordable Care Act subsidies that will expire at the end of the year and potentially cause millions of Americans to lose health insurance.

What Democrats did get was a promise from Republican Senate majority leader John Thune to allow a vote next month on extending the subsidies.

“The shutdown may have been long and painful for millions of Americans, but at least it achieved jack squat,” said Stephen Colbert on Monday’s episode of “The Late Show.”

“The president’s poll numbers are historically bad. He just got booed at a football game, and voters handed Democrats huge victories in Tuesday’s election. So naturally, Senate Democrats looked at all of that and said, ‘Now is the time to cave.’” said Seth Meyers on “Late Night.”

Now that the shutdown is nearing an end, Jimmy Kimmel said he’s skeptical that Thune and the Republicans will actually honor their pledge to take a vote on extending the ACA subsidies.

“If there’s one thing we know about Trump and his merry band of sycophants, it’s that their word is as good as gold,” Kimmel said.

The hosts called out all eight of the Democrats who voted with the Republicans, but Colbert specifically skewered Shaheen, who had said her constituents were asking: “Why can’t you all just work together to address the problems that are facing this country?”

Colbert seemed mystified.

“Cause the country is being run by insane people,” Colbert said.

Mark Shanahan can be reached at mark.shanahan@globe.com. Follow him @MarkAShanahan.