Something unusual and important is happening in Congress: Republicans and Democrats are working together to improve the health care system. And they’re doing so in defiance of President Trump, who appears determined to sabotage the Affordable Care Act and the health insurance of millions of people.

This surprising if modest burst of bipartisanship comes just days after the Senate failed to pass a Republican bill to repeal important provisions of the A.C.A., or Obamacare. On Monday 43 members of the House outlined a proposal to strengthen the insurance marketplaces created by the 2010 law. On Tuesday Lamar Alexander and Patty Murray, the Republican and Democratic leaders of the Senate Health, Education, Labor and Pensions Committee, said they would hold hearings and introduce a bill to cut premiums and encourage insurers to sell policies on the marketplaces for 2018.

It is, of course, impossible to know if such efforts will succeed. Even if they result in legislation, Republican leaders could refuse to bring it to the floor for a vote. Having treated Obamacare as a political piñata for seven years, Republicans might find it hard to actually help the program. Another danger is that Mr. Trump and his health and human services secretary, Tom Price, could try to pre-emptively weaken the marketplaces through administrative measures. Still, it’s good to see politicians actually doing their jobs. The sight of members of both parties working together in the public interest is uplifting, especially after the long partisan campaign to take insurance away from so many Americans.

Contrary to Mr. Trump’s tweets, Obamacare is not collapsing. But it needs work, and some insurance markets are in trouble. Insurers have said they will no longer sell policies in 20 counties in Indiana, Nevada and Ohio, and many are proposing to raise premiums because of the uncertainty created by Mr. Trump’s threats. Experts say insurers could withdraw from even more counties, especially in rural and suburban areas, if the president sabotages the law.