Washington had a head-spinning Wednesday night and Thursday morning, even by the dizzying standards of the Donald Trump presidency. Over Chinese food, the president on Wednesday night met at the White House with the top Senate and House Democrats, Charles Schumer of New York and Nancy Pelosi of California. Trump’s flirtations with the leaders of the left have been striking: Last week, he signed on to their idea to fund the government, to avoid a default on the national debt and to finance aid for victims of hurricanes Harvey and Irma, leaving the Democrats’ GOP counterparts, Mitch McConnell of Kentucky and Paul Ryan of Wisconsin, dumbstruck. This time, Trump wasn’t even bothering to meet with the Republicans, although across town at the vice presidential mansion, Mike Pence was in a lovefest with members of the conservative Freedom Caucus.

At 9:45 p.m., Schumer and Pelosi issued a statement saying they had “agreed” to work with the president toward a solution to the problem of how to handle undocumented immigrants who had come to the U.S. as minors. Last week, Attorney General Jeff Sessions announced that the Deferred Action for Childhood Arrivals (DACA) program would be suspended because, he claimed, President Barack Obama had overstepped his authority by issuing the order. The administration’s most prominent voice for cutting illegal and legal immigration, Sessions showed little interest in finding a permanent legislative solution to the DACA order. Instead, he cited the alleged benefits to American citizens of not having the so-called Dreamers, some 800,000 of them, compete for American jobs. Sessions' statement was met with outrage from Democrats and many Republicans, as well as from prominent businesses, such as Amazon, which joined the myriad legal actions to stop the move.

Almost immediately afterward, Trump began to take a very different tone than his attorney general, saying he could find a legislative solution to the DACA issue. On Wednesday night, he seemed to have cut a deal with Democrats.

Not surprisingly, anti-immigration Republicans were livid. The columnist Ann Coulter and Representative Steven King of Iowa were apoplectic, with King tweeting that if the reports of a Trump-Pelosi-Schumer deal were true, “Trump base is blown up, destroyed, irreparable, and disillusioned beyond repair. No promise is credible.” Calls flooded the White House from irate Republican legislators.

On Thursday morning, Trump flipped and flopped. Shortly after sunrise, he tweeted that there was no deal. Then, he tweeted how wrong it would be to send the Dreamers packing. Then, he spoke to reporters on the South Lawn of the White House before heading to Florida to meet with victims of Hurricane Irma. “We’re working on a plan for DACA,” he said, adding that his long-sought wall on the border with Mexico “will come later,” which only made his supporters more furious. Once he was in Florida, Trump spoke again: He said there was no deal with Pelosi and Schumer, but he also said the Democratic leaders and the Republicans were eager to repair the DACA program. He made another pitch for his wall but hemmed on a question of whether wall funding would have to precede a deal to keep the Dreamers here.

How do you make sense of all of this? Is Trump suddenly Mr. Bipartisan, someone who has cast off Republicans and gone rogue? Or is this merely the mercurial, erratic nature of a man prone to fits of anger? Or, should he be seen as utterly malleable, like a pillow shaped by whoever made the last impression on him?

The answer is all of the above—and more. Trump’s bipartisanship is unique in the history of the American presidency. For the 44 men (yes, all men) who preceded him, bipartisanship was a necessary tool for accomplishing their aims. Lyndon B. Johnson could not have passed the Civil Rights Act in 1964 without Republican votes because so many Southern Democrats opposed him. In 1978, Jimmy Carter could not have secured passage of an agreement giving up U.S. claims on the Panama Canal without Republican votes, because the Senate requires a two-thirds majority for the ratification of treaties. Sometimes presidents have had goals that put them at odds with majorities of their own parties.  Bill Clinton faced these moments. More than half of Senate Democrats voted against the NAFTA accord in 1993, so he had to pass it with GOP votes. The same was true with welfare reform in 1996. Barack Obama faces opposition from the leadership of the Democratic Party and a majority of Democrats when negotiating the Trans-Pacific Partnership.

Trump’s style of bipartisanship is entirely different for two very big reasons: He’s ideologically mercurial and he’s motivated much more by personal pique than other presidents. The most surprising thing about his bipartisan push is not that it’s happening, but that it took so long . Trump famously wasn’t a conservative or even a Republican until very recently. He favored legal abortion and gun control until he didn’t. In 1987, he took out a full-page newspaper ad lamenting where America was heading under President Ronald Reagan. Trump briefly considered running as the nominee of the Reform Party, which was the vehicle for the presidential bids of Ross Perot and Patrick Buchanan. He gave money to Chuck Schumer before he’d ever met Paul Ryan. And he ran against the establishment of his Republican Party, questioning them on everything from entitlements to trade.

Once in office, though, Trump was surrounded by traditional Republicans. Vice President Pence ran the transition and staffed the cabinet with five House GOP members, reflecting Pence’s many years in the House before he became governor of Indiana in 2013. Trump’s first chief of staff, Reince Priebus, was a former chairman of the Republican National Committee. No wonder the president’s legislative agenda was pure Paul Ryan—repeal and replace Obamacare, cut entitlements, go slow on trade, etc. Yes, Trump’s first seven months in office were marked by what at times seemed like his borderline personality, prone to fits of rage. His use of the presidency for personal attacks on everyone from Meryl Streep to Jim Comey to Bob Corker to Jeff Sessions was weird. Ethical standards didn’t exist for him; the president still owns his business, eschewing the normal protocols of divestiture. As weird as Trump has been, his legislative agenda had been pure donor-class, Pence-driven House Republican.

What we’re seeing now is not a new Trump, but the real Trump: freed from an ideological strait-jacket, more politically flexible but still motivated by pique more than bonhomie. The run to Schumer and Pelosi is born of a need to make a deal—any deal—because, in Trump’s mind, McConnell has let him down and Ryan’s not much better. His anger at McConnell for failing to pass a repeal of the Affordable Care Act is misplaced: All Republicans overreached in their efforts to destroy Obamacare and replace it with something that would have dumped millions of people off the health insurance rolls. As a tactician, McConnell is still deserving of his reputation. It was the policy that was flawed, but Trump saw failure as betrayal. In Schumer and Pelosi, he found a way to tweak Ryan and McConnell, and also to start putting some wins on the board.

If Trump seems flexible on DACA now, that’s not entirely surprising. Trump has long shown hesitancy about kicking out the Dreamers, going back to 2015. If we’re debating DACA right now, it’s because Trump fomented the DACA crisis at the behest of Sessions and adviser Steven Miller and due to the lawsuit from the conservative attorneys general and to his not really understanding what DACA was. Now, after spilling toys all over the floor, he’s cleaning them up. This is pure Trump.

It doesn’t mean that we’re in for a golden age of bipartisanship. Democrats who want to survive cannot begin to cozy up to Trump on a regular basis, not when he’s so reviled by their base. In time, the things Trump is wed to, like cutting regulations or sticking with his Christian base—which he won’t abandon—will put him in direct conflict with Democrats on, say, the Environmental Protection Agency and abortion. Trump is ideologically flexible, but he’s not a Democrat in any way and there are limits to what he can achieve with Pelosi and Schumer. Besides, Republicans do have majorities in both houses of Congress, and McConnell and Ryan have almost complete control over what issues will be taken up.