Gary Cohn, Donald Trump’s national economic adviser, made his bones at Goldman Sachs by proving to be an exceptional risk manager. Famously, he was part of the small group of Goldman traders and senior executives who figured out in 2006 that a meltdown was looming in the housing market and who positioned Goldman, through a series of clever trades that became known inside the firm as “the big short,” to benefit mightily nearly two years later when the financial crisis hit with a vengeance. In 2007, while much of the rest of Wall Street was reeling from the crisis’s first shockwaves, Goldman was cleaning up, thanks to its decision to bet against the mortgage market. That year, the firm made nearly $18 billion in pre-tax earnings—a number it has never seen again—and the top five Goldman executives, Cohn included, split a whopping $322 million. Cohn’s personal take from that honeypot? $72.5 million.

These days Cohn has been wrestling on a regular basis with a different form of risk management—and, mostly, losing. Working for Trump has been slowly eroding the reputation he spent 27 years crafting so meticulously at Goldman. His angst came to a head in August, during the 10 days after a group of white nationalists marched in Charlottesville, Virginia, when Trump repeatedly fumbled his response to an incident that left one protester dead. As Kate Kelly and Maggie Haberman of The New York Times reported on August 25, Cohn drafted a letter of resignation, and was prepared to deliver it to Trump. What has not been previously reported is that, according to a source with detailed knowledge of this thinking during that period, Cohn sought to resign twice while speaking directly to Trump during that 10-day period. He also spoke with John Kelly, the new chief of staff, about his desire to resign. But apparently, resigning from Trumpworld is far more difficult than one would expect. Cohn’s continued presence in the West Wing is a testament to a reality that is rapidly becoming crystalline: that Cohn, along with Kelly, Jim Mattis, the defense secretary, and Rex Tillerson, the secretary of state, are all that is standing between Trump and utter chaos and incompetence.

Cohn’s recent troubles began on August 15 in the lobby of Trump Tower when what was supposed to be a briefing with Trump and Steve Mnuchin, the treasury secretary, about the administration’s infrastructure plans turned into a chance for Trump to walk back the more conciliatory comments about Charlottesville he had made previously. While Trump doubled down on his divisive comments—there were “very fine people” among the white supremacist groups, Trump said—Cohn, who is Jewish, stood at Trump’s side, a pained expression on his face. After Trump left the lobby, Cohn was forced to field questions about what Trump had said. He declined to do so.

That began a 10-day period of introspection for Cohn. Should he resign? Should he publicly rebuke Trump? Should he stay silent and carry on? According to someone familiar with what happened, Cohn decided to resign, and drafted up his letter of resignation. It turned out not to be as easy to quit Trump as Cohn had hoped. On Friday, August 18, after a day of meetings at Camp David to discuss his South Asia policy, Trump flew on Air Force One to Morristown Airport, in New Jersey, to spend the weekend at his golf club in Bedminster. Trump landed at 5:23 P.M. and his motorcade took him to the Trump National Golf Club. By then Cohn was already in Bedminster, waiting for Trump to arrive so that he could go in and resign.

Video: Breaking Through “Scandal Fatigue” In the Era of Trump

He eventually got an audience with the president. They talked about Trump’s upsetting response to Charlottesville. Trump told him, “Is it really so bad?” according to the same person familiar with what transpired. Cohn conveyed to Trump how upset he was and that he wanted to resign. He unburdened himself to Trump. Trump told him to “think about it” and not to act rashly. Cohn emerged from the encounter with second thoughts. “I’ve been asked to think about it,” he said, according to the source. That night, Cohn headed to his house in the Hamptons and to a 30-person dinner party, where he arrived two hours late, at the home of Lloyd Blankfein, the C.E.O. of Goldman Sachs and his former boss. Over the weekend, he spoke to his wife and family, and others, about his concerns. His angst continued unabated.