Key elements of the administration’s strategy were formulated out of sight in Mr. Meadows’s daily meetings, by aides who for the most part had no experience with public health emergencies and were taking their cues from the president. Officials in the West Wing saw the better-known White House coronavirus task force as dysfunctional, came to view Dr. Fauci as a purveyor of dire warnings but no solutions and blamed officials from the Centers for Disease Control and Prevention for mishandling the early stages of the virus.

Dr. Birx was more central than publicly known to the judgment inside the West Wing that the virus was on a downward path. Colleagues described her as dedicated to public health and working herself to exhaustion to get the data right, but her model-based assessment nonetheless failed to account for a vital variable: how Mr. Trump’s rush to urge a return to normal would help undercut the social distancing and other measures that were holding down the numbers.

The president quickly came to feel trapped by his own reopening guidelines. States needed declining cases to reopen, or at least a declining rate of positive tests. But more testing meant overall cases were destined to go up, undercutting the president’s push to crank up the economy. The result was to intensify Mr. Trump’s remarkable public campaign against testing, a vivid example of how he often waged war with science and his own administration’s experts and stated policies.

Mr. Trump’s bizarre public statements, his refusal to wear a mask and his pressure on states to get their economies going again left governors and other state officials scrambling to deal with a leadership vacuum. At one stage, Gov. Gavin Newsom of California was told that if he wanted the federal government to help obtain the swabs needed to test for the virus, he would have to ask Mr. Trump himself — and thank him.

Not until early June did White House officials even begin to recognize that their assumptions about the course of the pandemic had proved wrong. Even now there are internal divisions over how far to go in having officials publicly acknowledge the reality of the situation.