WASHINGTON — On Monday, Mick Mulvaney, the acting director of the Consumer Financial Protection Bureau, brought in doughnuts for employees. Around the same time, Leandra English, the agency’s other acting director, sent an all-staff email thanking the work force for its service.

Awkward.

And so unfolded another frenetic workday in this corner of a capital city defined by hyperpartisan dysfunction: Two public servants — one a holdover from the Obama administration, the other a rushed temporary appointee by President Trump — messily and publicly vied to lead an agency that has fought for consumers while under political assault by Republicans. Its future as an independent agency rests on who leads it next.

By the end of the day, a federal judge was assigned to hear Ms. English’s request, filed late Sunday, to provide an emergency restraining order to block the president from appointing Mr. Mulvaney. Judge Timothy J. Kelly of the Federal District Court in Washington, who was nominated by Mr. Trump and confirmed in September, was perhaps the only person in the capital who refrained from rushing to issue an opinion.

At a hurriedly called and packed-to-the-gills hearing, Judge Kelly voiced his concerns, noting that lawyers for the president could not definitively say whether Ms. English was protected from losing her job. The judge also said that neither set of attorneys had addressed whether Mr. Mulvaney, who is also the director of the White House Office of Management and Budget, “can wear two hats.”