Leah Millis / Reuters

It was a meeting about maritime shipping, but President Donald Trump had other things on his mind. As he spoke privately with Republican lawmakers in the White House’s Roosevelt Room, Attorney General William Barr was all over TV testifying to a Senate committee about the Russia investigation. Trump had been watching the live coverage, he’d been briefed on Barr’s testimony—and sitting with his guests on Wednesday, he unburdened himself about the unfairness of it all, said a person familiar with the matter.

“He is worked up about it,” said this person, who spoke on the condition of anonymity in order to discuss the private meeting. “He’s not going to let it go. He’s not going to accept the advice to let it go. He’s not going to stop tweeting. He’s not going to change his approach.”

If Trump is to notch any meaningful legislative victories before the 2020 election—and he’s now promising a gargantuan infrastructure package—he’ll need to compartmentalize: to summon the mental discipline essential to passing history-making legislation. The chances of that happening look dim, however, because Trump can’t compartmentalize. Since his swearing-in, he’s proved unable to wall off the irritants and frustrations that cloud any president’s day and focus on a governing agenda. Indeed, the distractions seem to captivate him most; they’ve become his governing agenda.

Last month, former Vice President Joe Biden entered the presidential race. Normally, it would be up to 20-some Democratic rivals to beat him back and deprive him of the nomination. But Trump has leapt into the scrum. Before dawn on May 1, he delivered the first of 60 morning retweets of messages aimed at undercutting Biden’s support among union workers. He has also been insulting Biden’s energy level and appearance.

Now the president’s Biden fixation seems to be filtering down to the staff: Kellyanne Conway, the president’s counselor, spoke with reporters in the White House driveway last week and, unbidden, mocked Biden for not doing more to boost the economy in his eight years as vice president. Trump gets distracted. He tweets. His staff reacts. That’s how whims harden into White House messaging. “The strategy in the White House, on all things, is to wait for the president to tweet and then try to deliver on the tweet,” says Joe Lockhart, a former press secretary for President Bill Clinton.

In recent days, Trump has been preoccupied by random ephemera even as he’s embarked on a new infrastructure deal, announced last week after a meeting with Democratic lawmakers. He has been complaining about how his supporters are being treated by social-media companies. He’s called attention to the disputed result of this year’s Kentucky Derby, CNN ratings, his own poll numbers, and Nick Bosa, an NFL first-round draft pick who turns out to be a MAGA fan. What any of that has to do with bridges, airports, and highways isn’t immediately apparent.

But what most stands to derail a potential legislative breakthrough is his dyspepsia over Special Counsel Robert Mueller’s report and Democratic inquiries into his private business dealings and conduct in office. Trump won’t leave the Russia business alone. Nearly three weeks after the full 448-page report was released, and more than six weeks after Mueller finished it, Trump still talks about how he was wrongly targeted. On Sunday, he tweeted that two years of his presidency were “stollen” due to the inquiry into whether his campaign colluded with Russia in the 2016 election. “He honestly believes that he did nothing wrong and he honestly believes that it was a witch hunt,” the person familiar with the Roosevelt Room meeting said. “You can debate whether it was or it wasn’t; I’m just telling you what he believes.”

At least in the near term, Trump’s Russia obsession poses the greatest risk to his potential infrastructure deal with Democrats. The two sides agreed to spend $2 trillion rebuilding the nation’s infrastructure, a sum that’s equal to the nation’s needs, according to the American Society of Civil Engineers. It would amount to the sort of landmark achievement that eluded Trump’s predecessors. “I would like to do something. It may not be typically Republican,” Trump said at the meeting, according to a Democratic source who was in the room. “I’ll lead on this.”

Both sides have incentive to deal. Trump would like to roll into the 2020 election with a legislative accomplishment apart from the 2017 tax-cut law, which few Americans believe gave them any financial help. Democrats, meanwhile, would relish a chance to bring home to their districts needed jobs and investment. Yet Trump almost immediately dampened hope that the tentative deal would hold. By the weekend, he was walking back the commitment: $2 trillion had slipped to $1 trillion to $2 trillion. And it doesn’t appear that Trump has laid any groundwork for an infrastructure package on an immense scale.

The numbers have left White House aides and GOP allies with sticker shock. Representative Mark Meadows, a North Carolina Republican who is the chairman of the conservative House Freedom Caucus, told me: “I see no way to fund $2 trillion in infrastructure without raising taxes, and for most prudent political calculations, raising taxes is only a winner in progressive circles.”

“To me, that would be a ceiling that is unattainable,” said a White House official, speaking on the condition of anonymity, when asked about the $2 trillion figure.

Nor is it clear that Trump can set aside his differences with Democrats and work toward goals that are in their mutual interest. He is furious with Democratic lawmakers for digging into his record, targeting his tax returns, threatening him with impeachment, and summoning his top aides to testify. On Sunday, Trump upbraided Democrats for trying to get Mueller to appear before Congress, saying the special counsel should boycott the proceedings. “Are [Democrats] looking for a redo because they hated seeing the strong NO COLLUSION conclusion?” Trump tweeted. And he has ordered administration officials to resist Democratic subpoenas, feeding a toxic, partisan atmosphere that precludes consensus-building.

Trump has long been captive to his ever-shifting moods. Top aides fall in and out of favor. Policy positions are embraced and quickly discarded when no longer expedient. What’s different now is the moment. Trump is running for reelection on a strong economy and sizzling financial markets. But economies sour and markets cool. An infrastructure deal, by contrast, would be a durable achievement. Unlike his travel ban, it couldn’t be overturned by executive order.

Yet it requires focus. One figure from history who faced similar circumstances was Bill Clinton, who weathered an impeachment attempt borne of his affair with Monica Lewinsky. As the battle played out, he still made overtures to congressional accusers and didn’t let the bitterness he felt swallow his agenda.

In his book about Clinton’s presidency, The Survivor, John F. Harris describes a scene in which Representative Tom DeLay, one of the former president’s chief Republican detractors and an impeachment crusader, came to the White House at Clinton’s invitation for a ceremony about adoption. Clinton said at the event that his “heart just melted” when he read an article about how DeLay was committed to adoption and foster parenting. The moment was emblematic of Clinton’s capacity to compartmentalize. “He was able to continue to reach out to Republicans while they were trying to impeach him,” Lockhart says. “Trump makes things very difficult for himself because every day he poisons the well.”

Yet there’s one other distinctive Trumpian trait that could work in his favor and help salvage some sort of infrastructure deal: his instinct for self-preservation. After all, he wants to win reelection. He wants to validate his narrow victory in 2016 by showing it was no fluke. If an infrastructure package is part of the formula for victory, if it burnishes a four-year record that makes swing voters take a fresh look at him, Trump might accept a truce with Democrats.

Adam Schiff, the Democratic chairman of the House Intelligence Committee and one of Trump’s chief antagonists, told me the president is “guided by only one ideology.

“It’s not conservatism; it’s not Republicanism; it’s what is in his personal self-interest,” Schiff said. “If he believes it’s in his personal self-interest to get to yes on infrastructure, he will do it—no matter how much he may recoil at the idea of congressional accountability.”

Infrastructure, then, poses a kind of character test for the 45th president. Which is more important to him: indulging his anger and sense of victimhood, or signing his name to what would be a legacy-making accomplishment?

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.