President Donald Trump stirs up so many problems on a daily basis that his chief of staff, John Kelly, has come to define his success in terms of his ability to solve them. “If we end the day in neutral,” Kelly has told close associates on several occasions, “it’s a good day.”

Kelly still blames himself for returning to Washington during the president’s summer vacation at his golf resort in Bedminster, New Jersey, the day Trump condemned both sides for violence that erupted during a white supremacist rally in Charlottesville, Virginia. It was the first time Kelly spent an extended period away from the president after taking over from Reince Priebus in late July, and he felt that Trump might have avoided the ensuing public relations catastrophe had he been there. A distraught looking Kelly stood behind the president the following Monday when he tried to repair his initial remarks in a follow-up speech at Trump Tower.

Thursday seemed to offer a case study of the challenges confronting Kelly — and it illustrates why he has come to adopt a largely defensive approach to his job. The day began with the president tweeting his opposition to the reauthorization of the Foreign Intelligence Surveillance Act — a measure his own party was trying to push through Congress. It ended with a report that, in a closed-door meeting on immigration, he had demanded to know why the United States was admitting so many immigrants from “shithole countries.”