The White House has said President Trump’s Department of Homeland Security chief Kevin McAleenan will resign as of Nov. 11. But according to federal law, he’s already gone.

That’s because his authority to run the agency officially expired on Nov. 6, so while he will be running Homeland Security in name, he has lost the legal authority to do so.

Critics say that exposes the third-largest agency in the federal government — which includes U.S. Department of Border Protection, the Secret Service, and FEMA — to legal risk.

“It’s not clear what happens after [Nov. 6],” one Senate aide with knowledge of the transition said. “There hasn’t really been a situation like this before.”

John Bies, an eight-year veteran of the Obama Justice Department, tells VICE News that any new regulations DHS might enact in the interim period will be moot: “If he’s the one signing them, they wouldn’t be valid,” he said.

It’s not like the Trump administration didn’t see this coming. The last Senate-confirmed head of DHS Kirstjen Nielsen resigned on April 10. McAleenan then took over on an acting basis.

But under the Federal Vacancies Reform Act, once someone in the executive branch vacates their seat, a 210-day period is triggered in which someone can fill in temporarily without requiring Senate confirmation. That expired Wednesday.

The only way to extend that timeline is to nominate a permanent candidate for the job.

And while President Trump said last week that he would tap Chad Wolf, Nielsen’s former chief of staff, he still hasn’t formally done so. Even when he does, Trump has declined to specify whether he intends to nominate Wolf for the role permanently.

Even getting Wolf into an acting role will take some time and parliamentary gymnastics.

Senate Majority Leader Mitch McConnell (R-Ky.) will first have to hold a vote to confirm Wolf to his current position as undersecretary for strategy, policy and plans, before Wolf could serve as the acting DHS secretary. McConnell plans on doing that early next week, the Washington Post reported.

“That’s not an acceptable way to run one of our nation’s biggest national security agencies,” the Senate source says.

The aide describes the transition as unwieldy at best, and said it’s hard to under-emphasize “just how chaotic and how bad this is for the country and for our national security.”

A spokesperson for DHS did not return VICE News’ request for comment.

The secretary job is far from the only position still open at DHS.

Of the 18 most senior positions at the agency that require Senate confirmation, seven are vacant, with no nominations submitted to fill them.

On Tuesday, at a hearing about threats to national security, Sen. Gary Peters (D-Mich.) excoriated a top DHS official about the vacancies.

“The absence of steady leadership at the Department of Homeland Security is a driving force [of] institutional breakdown, and risks making us less safe,” he said.

Both Peters and Sen. Ron Johnson (R-Wis.), who together lead the Senate’s committee on homeland security, submitted a joint letter to President Trump asking him to nominate a permanent DHS secretary.

Trump has long relied on the Vacancies Act to fill his Cabinet positions and skirt Senate confirmation. As of July, at least 16 different people served as acting agency heads in the administration, or in a high-level executive branch role.

In the meantime, the Senate source tells VICE News they’re worried about more court challenges stacking up at the agency.

“I can’t predict what would happen, but I think if there are some policy decisions that are made in that intervening time, then there would be court challenges to that policy — ‘under what authority did you do this?’” the source says. “We were counting on a president to be compliant and to actually, like, nominate somebody.”

Elizabeth Landers contributed reporting.