The nation’s law enforcement agency is under siege, short-staffed because of delays in filling senior positions and increasingly at odds with a president who had already engaged in a monthslong feud with the government’s intelligence agencies.

Several current and former assistant United States attorneys described a sense of listlessness and uncertainty, with some expressing hesitation about pursuing new investigations, not knowing whether there would be an appetite for them once leadership was installed in each district after Mr. Trump fired dozens of United States attorneys who were Obama-era holdovers.

In the five weeks since Mr. Trump fired Mr. Comey, he has let it be known that he has considered firing Robert S. Mueller III, the special counsel leading the Russia investigation. His personal lawyer bragged about firing Preet Bharara, the former United States attorney for the Southern District of New York, who was let go as part of the mass dismissal of top prosecutors. Newt Gingrich, an ally of the president’s, accused Mr. Mueller of being the tip of the “deep-state spear aimed at destroying” the Trump presidency.

Inside the White House, those close to the president say he has continued to fume about the actions of Justice Department officials, his anger focused mostly on Mr. Rosenstein for appointing Mr. Mueller and on Attorney General Jeff Sessions, a longtime political ally whose decision to recuse himself from the Russia case in March enraged Mr. Trump.

What the president wanted out of the investigation was simple, several people close to him said: a public statement that he was not under a cloud. What he got instead were reports of Mr. Mueller’s intention to investigate him for possible obstruction of justice.