(Mandel Ngan/AFP/Getty Images)
Opinion writer

Movie supervillains often commit a grave tactical error when, in a moment of overconfidence, they tell the hero all the details of their evil plan. That is in essence what President Trump has done, except in his case he has told the entire world. He is desperate to give Attorney General Jeff Sessions the boot and replace him with someone who will save him from legal and political accountability in the Russia scandal. But Trump has painted himself into a corner.

In the midst of an investigation into the Russian attack on the 2016 election and the Trump campaign’s possible cooperation with that attack, Trump has repeatedly expressed his rage at Sessions for recusing himself from overseeing special counsel Robert S. Mueller III’s investigation. Which Sessions had no choice but to do, as a high-ranking Trump campaign official who had undisclosed contacts with representatives of the Russian government in 2016. Were Sessions overseeing the investigation, Trump could order him to shut it down and the whole thing would be over.

Trump has not been coy about his anger or the reasons for it. He hasn’t said that Sessions has been insufficiently vigorous in restricting immigration or undermining civil rights, or that he is mismanaging the Justice Department bureaucracy. He has made it clear that he wants protection and loyalty from Sessions, and that’s where Sessions has failed to perform. In an interview that aired on Fox News on Thursday, Trump said this about Sessions:

He took the job, and then he said, “I’m going to recuse myself.” I said, “What kind of a man is this?” And by the way, he was on the campaign. You know, the only reason I gave him the job, because I felt loyalty. He was an original supporter.

Trump might have been saying he felt loyalty to Sessions, or that he felt loyalty from Sessions. But it’s clear that the latter is all that matters.

Up until now, Trump’s aides and Republican members of Congress have been able to convince him that firing Sessions in order to replace him with someone more pliable would be too politically dangerous, and Sessions’s old friends in the Senate (where he served for 20 years) might be so peeved over his sacking that they’d refuse to confirm his replacement. We can interpret his public outbursts as the petulant reaction of a president frustrated at feeling constrained. But on Thursday, Sens. Lindsey Graham and Chuck Grassley, chairman of the Judiciary Committee, said that Trump could replace Sessions after the midterm elections and that would be fine with them.

So here’s how the president would almost certainly like things to proceed. First, he fires Sessions. Then he finds someone to replace him who has the one quality Sessions lacks: unswerving loyalty to Trump. And not just a general kind of loyalty, but a very specific kind: the willingness to fire Mueller as soon as Trump orders him to, perhaps on his very first day at the Justice Department. This nominee will be confirmed by Trump’s Republican allies in the Senate, he will assume office, he will fire Mueller and shut down the Russia investigation, and Trump will at last be free.

We don’t have to wonder whether that would be the plan, because Trump has made it clear that Sessions’s recusal from the Russia investigation is the primary complaint he has about his performance. There would be no point in replacing Sessions with someone else unless Trump was sure that person would protect him by shutting down the investigation.

But there’s a problem with this plan. Because Trump has made it so clear that he despises Sessions because Sessions isn’t in a position to fire Mueller for him, if and when he does fire Sessions, everyone knows that the only important criterion that he will use in choosing a new attorney general is whether that person will be willing to fire Mueller at Trump’s direction. From the moment of the firing, everyone will be asking, “Is this another Saturday Night Massacre?” The nominee will be asked by every senator and a hundred times in their confirmation hearings whether they discussed the matter with Trump, what they promised and what they intend to do. And don’t forget that Republicans control the Senate by only a 51-49 margin. Just two GOP defections would be enough to doom the nomination.

If the nominee’s position is that they’ll shut Mueller down, that would make them essentially an accomplice to a scheme to obstruct justice, and probably unconfirmable. And not just a scheme to obstruct justice, but perhaps the most egregiously corrupt and indefensible scheme to obstruct justice in American history.

To be clear, I’m not saying the participants in that scheme — this new attorney general and the president — would inevitably be prosecuted and convicted. I’m sure we could spend months or even years debating whether it was really criminal and what the consequences should be. But no one with even a shred of honesty could doubt that the purpose of the whole plan would be to impede the progress of an ongoing investigation, because the president has been so clear that his desire is precisely that.

Faced with the knowledge that if his nominee says he’ll shut down the Mueller investigation then he probably wouldn’t get confirmed, Trump might try to do what he and other Republican presidents have done when appointing Supreme Court justices on the matter of Roe v. Wade: Find someone who has been pre-vetted, so the president doesn’t even have to ask the question and the nominee can say the two never discussed it. The trouble is that firing Mueller isn’t like having a longstanding position on abortion. It’s specific to Trump, and it comes with the threat of going down in history as a participant in a monumental act of corruption. Trump will want to be absolutely sure, especially since in Sessions he mistakenly thought he was getting someone who would do anything for him. Just picking a loyal Republican won’t be enough.

Where does that leave Trump? He has the right to fire Sessions and appoint a new attorney general whenever he wants, and always has. But because he has made it so clear that he expects personal loyalty and protection from accountability, he might not be able to get a replacement confirmed until Mueller concludes his work.

That means he has no choice but to wait until the Mueller investigation concludes, which could be a month from now or could be six months from now. Once Mueller is done, of course, there would no longer be much point in firing Sessions, other than for revenge. But in the meantime, Trump is held fast by a trap, one that he built himself.