The three people with the greatest power over Donald Trump’s political future are Senate Majority Leader Mitch McConnell, Special Counsel Robert Mueller, and Trump himself.

And if the president’s recent treatment of McConnell and Mueller is any indication, Trump had better watch out.

The president is on a sustained campaign against the leader of the Senate. For the second day in a row, Trump broke from his vacation to attack the Kentuckian:

The tweet came 10 minutes after Trump was scheduled to lunch with Vice President Pence, who has been an intermediary between Capitol Hill and the White House.

Later Thursday afternoon, during a brief press appearance, he once again attacked McConnell for the failure of a Senate attempt to repeal Obamacare. “I said, ‘Mitch, get to work and let’s get it done,’” he said. “They should have had this last one done. They lost by one vote. For a thing like that to happen is a disgrace. And frankly it shouldn’t have happened, that I can tell you.”

Asked by a reporter whether McConnell should step down as majority leader, the president pointedly refused to endorse his leadership.

“Well, I’ll tell you what, if he doesn’t get repeal and replace done, and if he doesn’t get taxes done, meaning cuts and reform, and if he doesn’t get a very easy one to get done, infrastructure, he doesn’t get them done, then you can ask me that question,” Trump said.

McConnell has said that he doesn’t want to take up health care again until he has good reason to believe that he will win. The president’s frustration at his stalled legislative agenda is understandable, but it’s far from obvious that McConnell deserves the majority of the blame. Even if he does, attacking him is likely counterproductive.

There’s a dissonance to Trump taking time from vacation (one on which he is doing some work, while also squeezing in lots of golf) to attack McConnell. Although the Senate is in recess, that doesn’t necessarily mean members aren’t working. McConnell is home in Kentucky, speaking to people and making his rounds. Not all of a senator’s work is in Washington: These kinds of constituent services are an essential part of the work, which Trump doesn’t seem to understand.

But then, there’s a lot about the Senate that Trump doesn’t grasp. The president himself deserves a great deal of the blame for the health-care debacle. He has pushed hard for immediate repeal and replacement of Obamacare, but he has shown little understanding of either health-care policy or how it gets made. The president has presented no comprehensive plan of his own, but he has demanded that Congress repeal a major law and replace it with something better in a matter of months. (McConnell complained in Kentucky on Monday that Trump had “excessive expectations about how quickly things happen in the democratic process.”)

Trump’s efforts to lobby lawmakers on behalf of the latest repeal bill were sporadic, unfocused, and tardy, and he keeps promising things (like lower premiums and expanded coverage) that no GOP plan thus far actually produces. He went from praising the House repeal plan to turning around and calling it “mean.” Even on the most basic question—should Congress simply repeal Obamacare, repeal and immediately replace it, or wait for it to falter?—Trump has changed his position repeatedly.

McConnell is not beyond reproach. He, along with other Republican leaders, promised for seven years that they would repeal and replace Obamacare, but the party never produced a detailed plan that had any chance of passing both chambers of Congress. His management of the recent process was criticized by members of his own caucus, notably John McCain and Ron Johnson. But their objections were rooted in the fact that McConnell was apparently trying to do Trump’s bidding and move a bill as quickly as possible. (As my colleague Russell Berman reported Wednesday, McConnell is under pressure not only from the White House but also from conservative groups and insurgent candidates for office.)

So now Trump is entertaining the idea of pressing for McConnell’s removal if he is unable to achieve what looks, for the moment, unachievable. What, and who, does the president imagine would come in his wake? The majority leader’s reputation has been tarnished by the health-care failure, but he remains a savvy Senate operator with an unmatched grasp of the body’s arcane procedures.

It’s hard to imagine that any other Republican would be able to do a better job of marshaling votes than McConnell has done. (His right-hand man, Whip John Cornyn, is for obvious reasons also implicated in vote-counting failures.) And that’s assuming any other senator would want to take the job, especially having seen McConnell’s failure and the bullying he’s received at the hands of the president. Senate President Pro Tempore Orrin Hatch batted away Trump’s criticism Thursday and praised McConnell. Trump can say that infrastructure is easy, but that doesn’t make it true, and tax reform is probably even harder.

That gets to the point of things: Aside from Mueller and his investigation, and Trump’s own lack of discipline, McConnell has more power than any individual over the fate of this presidency. The president can ill afford to lose him. It’s not just getting a single major legislative push through. Trump’s single greatest achievement, the confirmation of Justice Neil Gorsuch to the Supreme Court, came through the Senate. Any other appointees he wishes to have confirmed will have to come through the Senate too.

Perhaps Trump fails to understand how much his fate is intertwined with McConnell’s; he hasn’t displayed much interest in or grasp of how to work with Congress so far. Maybe he doesn’t care. Maybe he’s just improvising. He did, notably, throw public support behind Senator Luther Strange, who is McConnell’s horse in a bitter special election in Alabama, this week.

While Trump has shown little sustained interest in the nitty gritty required to get things done, his political instincts and his instinct to assign blame remain sharper. By attacking McConnell, he absolves himself of blame for the failure of Obamacare repeal, and he reemphasizes his role as an outsider who doesn’t play the Washington game and who won’t tolerate the Senate’s ossified mores. McConnell is not particularly popular, and that’s especially true within Trump’s own base, which holds both McConnell’s ideological commitments and his long tenure in Washington as suspect.

Campaigning against McConnell could have its short-term benefits, then, but it’s unlikely to actually produce health-care repeal, tax reform, and an infrastructure bill any faster. It’s tough to be an outsider when you’re president of the United States, but it’s even tougher to succeed when you’re so far outside that you’re feuding with the most powerful legislator in your own party.