WHEN THE best that can be said is that the nation can "breathe a sigh of relief," as Senate Minority Leader Charles E. Schumer (D-N.Y.) put it Wednesday, that's better than a dive over the cliff. The deal struck by President Trump and Congress to postpone until December a divisive battle over fiscal matters is hardly an ideal solution. Nonetheless, the president's decision to reach out to Democrats to ensure against a disastrous default on the nation's debts is encouraging, both as a matter of responsible governing and for its bipartisan character.

Surprising the GOP congressional leadership, Mr. Trump quickly agreed with a proposal by Mr. Schumer and House Minority Leader Nancy Pelosi (D-Calif.) to extend the government's borrowing capacity until December, fund the government until then and provide billions of dollars in hurricane relief. According to The Post, Mr. Trump and the Democratic leaders also reached a handshake deal to pursue a plan to permanently remove the requirement that Congress vote every time the nation needs to raise the debt ceiling.

Such a long-term fix is well worth pursuing. The all-too-frequent need for Congress to authorize fresh debt has become a destructive game of chicken for both parties. Without relinquishing its constitutional prerogatives, Congress should join the president in looking for a mechanism that is less likely to produce grandstanding — and threats to the nation's financial stability.

The deal announced Wednesday, and Senate action that followed Thursday, would — with House concurrence — put off until December an anticipated congressional fight over the 2018 budget. Mr. Trump was clearly anxious about a contentious battle over fiscal issues in the weeks ahead, fearing it would shake financial markets or interfere with providing hurricane relief aid. His decision to reach out to Democrats for the first time in his administration suggested that frustration with congressional gridlock has led him toward a welcome openness to bipartisan coalitions.

If so, Democrats should be willing to respond constructively. They proposed the three-month reprieve in hope of gaining some leverage on important issues in the months ahead, including the extension of legal rights to the immigrants known as "dreamers," whose protections are being rescinded on Mr. Trump's orders earlier this week. This is politically clever but not very responsible in the long run. Linking immigration legislation to another extension of borrowing authority in December could trigger a game of brinkmanship.

If Mr. Trump and Congress really want Americans to breathe a sigh of relief, they should invest in genuine bipartisanship and make an early deal to tackle Deferred Action for Childhood Arrivals legislation once and for all. Mr. Trump offered a nod in that direction Thursday by issuing a tweet, reportedly requested by Ms. Pelosi, assuring dreamers that they would not suffer harm for the next six months. But what's needed is legislation affirming their rights to remain, study and work in the country.

Even better would be a serious bipartisan effort to come to grips with the nation's long and deep fiscal disorder, including a long-term solution for the debt ceiling and passage of a responsible 2018 budget. Too much to hope for? Probably. But for now, at least, the worst has been avoided.