The detailed briefing this past spring by Central Intelligence Agency analysts came to a clear conclusion: Iran appeared to be complying with the terms of the 2015 deal negotiated by the Obama administration, making it significantly harder for the country to build a nuclear bomb. The International Atomic Energy Agency, which does independent monitoring, had arrived at the same assessment.

Mike Pompeo, the C.I.A. director, listened carefully. He wasn’t impressed. “Good,” he said, according to an agency insider. “But we know they’re cheating anyway—we’re just not seeing it.”

Dean Boyd, director of the agency's Office of Public Affairs, responded in an email with the following statement: “With respect to Iran, the director has been adamant that C.I.A. officers have the time, space and resources to make sound and unbiased assessments that are delivered to policy makers without fear or favor. He has ensured that that the C.I.A. makes rigorously objective assessments on compliance with the Joint Comprehensive Plan of Action. The director has placed leadership of the C.I.A.’s Iran-focused efforts in the hands of his deputy and an individual with decades of experience in delivering candid assessments. These two career professionals drive the C.I.A.’s analysis and collection and render sound judgements for U.S. policy leaders on Iran and its malign activities.”

The last couple of years have been difficult for U.S. intelligence agencies. A controversial investigation of Democratic nominee Hillary Clinton made the F.B.I. an unhappy central player in the 2016 presidential campaign. The winner of that contest, Donald Trump, bashed America’s intelligence services as “a disgrace,” accusing them of using tactics out of Nazi Germany for trying to evaluate salacious allegations about him compiled in the Steele Dossier. Even an attempt to mend fences came across as a slight, when Trump stood in front of a wall dedicated to C.I.A. officers killed in the line of duty and delivered a self-aggrandizing speech.

Video: Everything About the James Comey Affair

Hurt feelings, though, are hardly the most significant consequence of Trump’s presidency for the intelligence agencies. It’s the politicization of the F.B.I. and the C.I.A.’s work which is having a corrosive effect on everything from the way that reports are evaluated to the brain drain at both shops.

The first big blow at the F.B.I. was the firing, in May, of James Comey. Plenty of rank-and-file agents were dismayed by how Comey inserted himself and the bureau into the 2016 campaign drama, but that disquiet was outweighed by revulsion at Trump’s abrupt dismissal of the director. In August came a fresh stunner: Trump’s pardon of former Arizona sheriff, and convicted criminal, Joe Arpaio. “Pardons and commutations never go down well with law-enforcement folks, whether they are for Chelsea Manning or Scooter Libby,” said former F.B.I. agent Asha Rangappa. “But the Arpaio pardon, coming in this context, was troubling in what it said about the president’s respect for the rule of law.”