The president and the speaker of the House questioning each other’s sanity. A lone-wolf Republican blocking desperately needed disaster aid. Talks on bipartisan trade, infrastructure and fiscal policy in tatters, with a potential government shutdown and federal default looming in the fall.

This week’s Washington roller-coaster ride trashed hopes that an unconventional president and a divided government might produce breakthroughs on matters of bipartisan concern. Instead, lawmakers appear poised to continue an eight-year trend and spend the next 18 months lurching from deadline to deadline, crisis to crisis, beholden to President Trump’s whims and unable to assert themselves in any meaningful way.

Those dynamics played out over three days this week. On Wednesday, Trump angrily walked out of a White House meeting called to discuss a potential infrastructure accord, saying he would not cooperate with Democratic lawmakers while they investigated him. On Thursday, Trump abruptly ended a months-long disaster-aid impasse by largely capitulating to Democrats, saying a disaster aid bill had his “total approval.” Then, on Friday, a member of the pro-Trump House Freedom Caucus blocked the bill — delaying its passage for days and giving foes time to change the president’s mind.

The back-and-forth left lawmakers bewildered. While Republicans credited Trump with “breaking the logjam” on disaster aid Thursday, Democrats pointed out that he had created the logjam in the first place. The finger-pointing only increased Friday.

“He’s an erratic, helter-skelter, get-nothing-done president,” Senate Minority Leader Charles E. Schumer (D-N.Y.) said. “If he stays out of it and lets us work together, we might get some things done. But the Republicans have to have the courage to buck him. They know in their hearts how he just fouls everything up.”

The GOP, meanwhile, pointed to the brewing debate among House Democrats about whether to launch a formal impeachment inquiry against Trump and defended the president’s unprecedented blanket rejection of congressional subpoenas. In the face of that kind of resistance, some argued, Trump’s actions — including his dramatic decision to blow up the infrastructure meeting Wednesday — could be excused.

Rep. Chip Roy (R-Tex.) on May 24 blocked a unanimous consent request to pass a disaster aid package before the Memorial Day recess. (House of Representatives)

“He’s sitting there, he’s dealing with — we’ve got Iran, we’ve got North Korea, we’ve got China, we’ve got Venezuela, we’ve got Cuba, we’ve got a disaster bill, we’ve got a crisis at the border,” said Sen. Rick Scott (R-Fla.), who helped nudge Trump toward a disaster deal. “And the Democrats are forgetting that he won the election. They’re still mad about 2016.”

A few issues have bridged the partisan divide on Capitol Hill: The House on Thursday cleared a bill on retirement savings on a vote of 417 to 3, and the Senate took action later in the day to combat an epidemic of unsolicited robocalls, voting 97 to 1.

But such bipartisan bills have been the exception. A total of 18 bills have become law since the beginning of the year. Two could be deemed major: a public-lands measure and the vast fiscal 2019 spending bill, which was passed only after a 35-day partial shutdown of the government.

The others were minor: Several extended existing government programs, another honored former senator Robert Dole (R-Kan.) with the honorary rank of Army colonel, and another aimed to “clarify the grade and pay of podiatrists of the Department of Veterans Affairs.”

The Senate, in particular, has spent the vast majority of its time on nominations rather than legislation. So far in the 116th Congress, according to a ProPublica analysis, 71 percent of Senate votes have dealt with presidential nominations — outstripping the 55 percent in the first two years of the Trump administration and the 9 percent in the final two years of the Obama administration.

That has exasperated Democrats, who have passed a number of meaty pieces of legislation — including a sweeping elections and ethics reform package, several health-care measures, civil rights protections for LGBT Americans, and a renewal of the Violence Against Women Act — largely on partisan lines.

The Republican-controlled Senate, under Majority Leader Mitch McConnell (Ky.), has taken up none of them, and in tweets, Trump accused Democrats of “getting nothing done in Congress” and calling them “THE DO NOTHING PARTY!”

“He should look at all the bills the House passed and how many of them McConnell has put on the floor,” Schumer said Thursday. “The answer is none, because McConnell has made the Senate a graveyard. We should be debating issues like health care. Like cleaning up the swamp. Like net neutrality. Like supporting equal rights. We’re not debating any of them.”

Before leaving the White House for a trip to Japan, Trump defended his personal attacks on House Speaker Nancy Pelosi (D-Calif.), saying she is “not helping this country” after she suggested on Thursday that Trump’s family ought to stage an “intervention.”

He also reiterated his aversion to allowing a “two-track” relationship with congressional Democrats where, on one hand, they pursue bipartisan legislative deals while, and on the other, they pursue vigorous investigations of his administration, personal finances and election campaign.

“I think they can only do one thing or the other, so let them finish the one,” he said, referring to the probes. “I’d like to talk about lowering drug prices,” Trump added. “But I can’t do that when all they do is want to try and do a redo of the Mueller report. . . . It’s over. There is no redo. They lost.”

Later, he tweeted praise for McConnell and his record in confirming judges, noting, “We are getting into record territory!”

Passing actual legislation has been much tougher. The disaster bill, in particular, explored new frontiers of dysfunction and contradiction. The clash played out over the course of months, with Democrats rejecting Republican offers over a lack of funding for hurricane-ravaged Puerto Rico. Trump repeatedly resisted increased aid to the U.S. territory. Later, the Trump administration inserted the explosive issue of immigration by adding a $4.4 billion request aimed at addressing the border crisis, further stalling the talks.

Lawmakers on both sides, weary of the standoff, pushed for a deal this week before the week-long Memorial Day break. But the talks remained stalled Thursday, with House members set to rush out the doors after morning votes. With no deal at hand, Pelosi sent lawmakers home, leaving Republicans railing to reporters against Pelosi and Democrats.

“Speaker Pelosi has shown where her priorities are,” Minority Whip Steve Scalise (R-La.) said. “They would much rather focus on all this harassment of the president and the witch hunts.”

But within hours, under prodding from McConnell and Sen. David Perdue (R-Ga.), Trump had caved, agreeing to remove the border funding — setting up quick Senate passage of the bill on a resounding 85-to-8 vote. A day later, Rep. Chip Roy (R-Tex.) blocked passage of the bill in the House, frustrating members of both parties.

Higher-stakes battles are still to come. Democrats in the House are preparing to spend June passing spending bills in a bid to avert another government shutdown in October, but without agreement on overall spending levels, those efforts might be for naught. A Capitol Hill negotiating session Tuesday involving Pelosi, McConnell and Treasury Secretary Steven Mnuchin generated upbeat predictions but no actual deal, and the eruption at the White House on Wednesday cast a shadow on future talks. A deal to raise the federal debt limit also hangs in the balance.

Neil Bradley, a policy director for the U.S. Chamber of Commerce and a former GOP congressional aide, compared Wednesday’s infrastructure blowup to past occasions of brinkmanship — such as the stop-and-go passage of the 2008 Wall Street bailout and the fiscal cliff standoff of 2011.

“We remember plenty of other times where we’ve had similar scenes with an important agenda item,” he said, referring to business leaders. “And lo and behold, after the dust settles, Republicans and Democrats, the administration and Congress, have been able to come back together and get the work that needs to get done.”

But House Budget Committee Chairman John Yarmuth (D-Ky.) said the hard-nosed partisan fiscal negotiations that marked the Obama administration were at least somewhat predictable.

“Now it’s a three-sided negotiation, and one of them is unstable,” he said. “We know we can get a deal with the Senate — that’s not all that hard — but the president’s a wild card.”

Among those bewildered by Trump’s sudden capitulation on the disaster bill was Sen. Debbie Stabenow (D-Mich.), who was present in the White House for Trump’s three-minute Cabinet Room lecture lambasting the House investigations.

“There are many, many, many theatrics on a daily basis, and so I think, every day, it’s very hard to really be able to count on anything,” she said. “So we take it a day at a time.”

“Now,” she added, “we wait until the next outburst.”

Rachael Bade, Paul Kane and ProPublica’s Derek Willis contributed to this report.