Mr. Trump has made clear he likes things this way; he can exert greater control over what amounts to glorified temp workers, and he doesn’t have to bother with obtaining the Senate’s approval of his appointees. But it is a lousy way to run a department — especially one so sprawling — fueling instability, eroding morale and draining vital agencies of experienced, competent leaders.

The search for Mr. McAleenan’s replacement has reflected this Trumpian chaos. Some of the candidates being floated are not interested in the job, The Times has reported. Others are regarded as insufficiently hard-line to suit the president’s more hawkish aides.

Two officials seen as top choices are Ken Cuccinelli, the acting director of United States Citizenship and Immigration Services, and Mark Morgan, the acting commissioner of Customs and Border Protection. Mr. Cuccinelli and Mr. Morgan, outspoken immigration hard-liners, might have trouble winning Senate confirmation. This is especially true of Mr. Cuccinelli, who made an enemy of the majority leader, Mitch McConnell of Kentucky, by backing a McConnell challenger in a 2014 Senate primary.

Complicating matters, the White House’s legal counsel initially determined that, under federal law, both men were ineligible to serve in an acting capacity — that is, without confirmation. Undeterred, members of the administration began searching for ways to skirt the law and, according to The Times, believe they’ve found a loophole that would allow the president to name someone first to an “inferior officer” post, then promote the person on up to acting secretary. All without consulting the Senate, of course. In other words, the Trump administration has been exercising its imagination to invent a way to doubly thwart the will of Congress and evade confirmation of an appointee to one of the most important cabinet posts.

The move would most likely face a court challenge. It might also alienate Senate Republicans, who are already warning against such a runaround — especially if Mr. Cuccinelli is involved. “The White House would be well advised to consult with the Senate and senators before they take any decisive action that might be embarrassing to Mr. Cuccinelli or to the White House itself,” Senator John Cornyn of Texas told Politico.