Illustration by Eddie Guy

The day after Donald Trump’s election, morning dawned with a drizzle in Washington, D.C. And at 1600 Pennsylvania Avenue, a few dozen White House staffers crowded into the West Wing office of Josh Earnest, President Obama’s press secretary.

They were a bleary-eyed bunch—from both lack of sleep and an excess of trauma—struggling still to grasp the historic surprise of Trump’s win only hours earlier. Earnest tried his best to raise their spirits, reminding the aides that they all still had jobs to do, that they needed to “run through the tape.” He was in the middle of his pep talk when word came that the group was wanted down the hall. Barack Obama had summoned them to his office.

The team trudged through the White House corridor, including in their ranks a number of junior members who’d never been to the Oval Office before, much less met Obama. They filed in, lined the perimeter wall, and turned their eyes toward the president, who stood in front of the Resolute desk along with Vice President Joe Biden. Obama had been up late the night before, too, watching the election results. Around three o’clock in the morning, he’d placed phone calls to both Hillary Clinton and Trump. But Obama evinced neither fatigue nor despair. Instead, he projected an energized sense of calm.

“This is not the apocalypse,” Obama told the staffers. He reminded them that despite the election results, the majority of Americans supported the work they’d done. And he pointed out that the country had previously weathered periods during which there had been leaders and presidents of whom people had been fearful. America had survived, he said, because it’s a strong country. History, he went on, “zigs and zags.” Obama walked around the office, shaking his staffers’ hands and thanking them for their efforts. To those who were crying, he offered hugs.

It was a familiar role for Obama. During his time in the White House, he often seemed less commander in chief than consoler in chief. From Tucson to Newtown to Charleston, he had ministered to those living in the aftermath of mass shootings; to those who had lost their homes to hurricanes or wildfires or other natural disasters, he had offered words of solace and a shoulder to cry on. As Valerie Jarrett, Obama’s old friend and mentor from Chicago, who spent all eight years with him in the White House as his senior adviser, recently put it to me: “There’s no one you want with you when you have something traumatic happen more than President Obama.”

And he’s never played that role more than in the aftermath of the election. In phone calls and in one-on-one meetings, Obama has had to reassure not just his staff but American and foreign leaders, too, that the end is not nigh. “I think he truly believes that,” Dan Pfeiffer, a former White House senior adviser, told me. “People that know him know that he’s an optimist at heart.” But all of Obama’s hopefulness, all of his faith in the strength of America, cannot hide one undeniable fact: For the first time in eight years, as Obama seeks to comfort Americans going through a traumatic event, he knows in the back of his mind that his life has also irrevocably changed. This time, it’s not a town in Oklahoma flattened by a tornado; it’s him.

Before Donald Trump, Barack Obama had big plans for his post-presidency. At just 55, he’d be among the youngest former presidents in American history—joining the likes of Teddy Roosevelt, Ulysses S. Grant, and Bill Clinton—and he was eager to fill his days. He would write a memoir of his White House years, a book that’s expected to fetch as much as $20 million and that Obama, according to one intimate, hopes will match Grant’s for literary eloquence.

He’d work on his foundation, which would perhaps do even more good than the outfit that the Clintons run (while likely avoiding anything resembling controversy). “If the Clinton Foundation was about bringing a lot of prominent and wealthy people together and raising money from them to throw at poverty and disease around the world,” says Jon Favreau, the former Obama speechwriter who’s now advising his old boss’s foundation, “I think the Obama Foundation will be a lot more about grassroots, bottom-up change, more in line with community organizing.”

More than anything, Obama—and especially his wife, Michelle—was ready for a break. And while he didn’t plan to take quite as long of one as Roosevelt, who shortly after leaving the White House went on a yearlong African safari, he planned a lengthy vacation. “He is looking forward to January 21, when he and his wife can hang out and relax and they can just stay up and talk as late as they want,” says Jarrett, “and he doesn’t have to worry about what’s waiting for him in a big briefing book the next morning.”

“There was one sort of framework for what his post-presidency would look like, which was contingent on Clinton winning. Then Trump happened and that threw it all in the trash bin.”

Obama, to be sure, will still do all these things, but now they will be done in the shadow of Trump; his angle of repose has suddenly become much sharper. “You can lock in progress for generations if you win three in a row,” says Pfeiffer of the niceties of handing the White House keys to a successor who served in your administration, as Hillary Clinton had in Obama’s. “Some of the battles that would have been settled with a Clinton win will now continue for the next 4 to 20 years.” Another Obama adviser says: “There was one sort of framework for what his post-presidency would look like, which was contingent on Clinton winning. Then Trump happened and that threw it all in the trash bin. Now it’s Plan B.”

In the weeks since the election, this Plan B has been taking shape, as Obama has consulted with a range of people, from current and former advisers to historians, about how he should conduct himself in his post-presidency, doing much of his thinking during long days on the golf course throughout his Hawaiian vacation in December.