Kevin Lamarque / Reuters

President Donald Trump says he hates to see Alex Acosta go. That doesn’t mean he didn’t quickly accept the labor secretary’s resignation, though.

Under fire for his involvement in the sex offender Jeffrey Epstein’s light 2008 sentence, Acosta announced his resignation this morning, two days after a disastrous press conference in which he seemed to criticize Epstein’s victims for not coming forward. Trump tweeted his praise for Acosta: “Alex Acosta informed me this morning that he felt the constant drumbeat of press about a prosecution which took place under his watch more than 12 years ago was bad for the Administration, which he so strongly believes in, and he graciously tendered his resignation. Alex was a great Secretary of Labor and his service is truly appreciated.”

One of the peculiar threads of Trump’s first 15 months or so in office was his strong aversion—notwithstanding that famous catchphrase—to actually firing aides, even when he clearly neither liked nor respected them. This was true of Press Secretary Sean Spicer and Chief of Staff Reince Priebus, but the most glaring example was Attorney General Jeff Sessions. More recently, however, Trump has developed a kinder, gentler machine-gun hand: He’ll happily cut loose an aide who’s causing him political trouble.

As he does so, something else has become clear. Whether the president praises his aides, or attacks them, on their way out the door has very little to do with how well they’ve served or the circumstances that occasioned their departure—instead, it depends on whether they’ve been publicly loyal and deferential to Trump, or questioned his judgment.

When acting Defense Secretary Pat Shanahan withdrew from consideration to head the Pentagon permanently in June, for example, over concerns about his handling and disclosure of domestic violence in his family, Trump lauded him with a particularly ill-chosen cliché.

“Acting Secretary of Defense Patrick Shanahan, who has done a wonderful job, has decided not to go forward with his confirmation process so that he can devote more time to his family,” the president tweeted. “I thank Pat for his outstanding service.”

Even as aides urged Trump to ax scandal-ridden EPA Administrator Scott Pruitt, the president hesitated. But when Pruitt finally departed in June 2018, Trump was fulsome in his praise: “I have accepted the resignation of Scott Pruitt as the Administrator of the Environmental Protection Agency. Within the Agency Scott has done an outstanding job, and I will always be thankful to him for this.”

Recently, Trump has celebrated even those aides who have left on bad terms. By the time Chief of Staff John Kelly departed the administration, he was reportedly not on speaking terms with Trump, yet the president called him “a great guy” “who has served our Country with distinction.” Spicer, who Trump by all accounts found weak and ineffective, was described as “a wonderful person who took tremendous abuse from the Fake News Media - but his future is bright!” When his book was published a year later, Trump plugged it.

When the economic adviser Gary Cohn left in a disagreement over tariffs, Trump was effusive. “Gary has been my chief economic adviser and did a superb job in driving our agenda, helping to deliver historic tax cuts and reforms and unleashing the American economy once again,” Trump said in a statement. “He is a rare talent, and I thank him for his dedicated service to the American people.”

But not everyone gets this treatment. Trump has been happy to toss out other aides and to take potshots at them after they leave. As Special Counsel Robert Mueller’s report chronicled, Sessions attempted to resign in May 2017, at Trump’s behest. The president refused to accept the resignation, but also declined to return it to Sessions. Somehow, Sessions held on to his job until just after the 2018 election. But Trump’s animosity toward Sessions—one of his earliest endorsers in the Republican Party—has lingered. On Thursday, Senator Richard Shelby told The Hill that Trump “was not on board” with Sessions running to reclaim his old Senate seat, even though some Republicans see it as the best chance to win back the seat from Democrats.

Priebus was sent home upon arrival on the tarmac at Andrews Air Force Base from a presidential trip. Like Elvis, Secretary of State Rex Tillerson met his demise while on the toilet, though in Tillerson’s case he learned of it by way of a phone call from Kelly. White House Counsel Don McGahn learned of his firing from a tweet. National Security Adviser H. R. McMaster, a three-star general, was denied a fourth star by being precipitously tossed without a soft landing back in the military.

It’s not hard to see the breakdown between these two kinds of firings. Most of the people who have gotten the harsh treatment are those who have been publicly at odds with Trump. Tillerson pushed back on Trump’s foreign policy, and reportedly called him “a fucking moron” in front of colleagues. McMaster didn’t use such colorful language, but seemed to have a similar view of both the president and his policies. Sessions recused himself from the Russia investigation and didn’t “protect” Trump as the president wanted. McGahn cooperated with Mueller.

But no matter how aides might embarrass themselves or their office, they’ll get a pat on the back from the president as long as they aren’t seen to be publicly undercutting him. Acosta may have allowed Epstein to get away with just a slap on the wrist; Shanahan may have failed to make adequate disclosures to the Senate; and Pruitt was comically corrupt. But they all lavished praise on Trump. Even Kelly mostly kept his disagreements with Trump internal, and was a good soldier in public.

To test this, consider the cases of the strategist Steve Bannon and Defense Secretary James Mattis. Each man earned compliments from Trump on his way out the door. When Bannon was pushed out in the aftermath of the Charlottesville, Virginia, debacle (in large part thanks to Kelly), Trump thanked Bannon and pumped up his return to Breitbart. But when, several months later, Michael Wolff’s Fire and Fury revealed Bannon’s criticisms of Trump, the president christened him “Sloppy Steve” and exiled him from favor. For Mattis, the reversal came faster. When the Pentagon chief resigned in December 2018, Trump was quick to celebrate him:

General Jim Mattis will be retiring, with distinction, at the end of February, after having served my Administration as Secretary of Defense for the past two years. During Jim’s tenure, tremendous progress has been made, especially with respect to the purchase of new fighting equipment. General Mattis was a great help to me in getting allies and other countries to pay their share of military obligations. A new Secretary of Defense will be named shortly. I greatly thank Jim for his service!

The president apparently hadn’t read Mattis’s resignation letter, which vaguely but unmistakably critiqued Trump’s handling of allies. As the realization dawned on Trump, he changed his tune, taking shots at him on Twitter and moving Mattis’s departure date up two months.

Even as Acosta packs up his desk, Axios reports that Trump would like to rid himself of Director of National Intelligence Dan Coats. (Just because Trump is mulling firing someone doesn’t mean Coats is going anywhere soon; just ask Sessions.) As my colleague Kathy Gilsinan reported in February, Coats has straddled the need to tell the president the truth with the knowledge that telling him the truth often outrages him. Whether Trump praises Coats or dumps him unceremoniously should offer some indication of how well the DNI managed that balance.

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