In the East Room of the White House on Saturday night, the director of the F.B.I., Kash Patel, was huddling with Tulsi Gabbard, the director of national intelligence.
It was just a few hours after Elon Musk threatened to fire federal workers who failed to send an email describing what they did during the workweek. The two cabinet officials found a quiet spot to confer on the sidelines of a dinner for the nation’s governors.
Obeying Mr. Musk’s order could reveal national security secrets and other sensitive information, they agreed, according to three people familiar with the conversation. Mr. Patel and Ms. Gabbard were still wholeheartedly behind Mr. Musk’s goal of slashing the size of the federal work force. But they could not allow their workers to follow the directive, even if it would defy Mr. Musk — and, more important, annoy the president.
Across the top ranks of the government, there were more conversations. Ms. Gabbard spoke with John Ratcliffe, the C.I.A. director. Chiefs of staff and senior personnel officers at the Defense Department and other agencies consulted one another about what to do, even as managers around the country fielded panicked questions from employees about whether they were at risk of being fired from their jobs.
Cabinet secretaries at major agencies found themselves struggling to figure out how to respond to a directive from the president’s most powerful adviser without compromising their own staff. Several secretaries and top staff at major agencies that deal with sensitive matters called the White House repeatedly over the weekend looking for guidance, according to people with knowledge of the matter.
Mr. Patel was the first to push back publicly.
“The F.B.I., through the Office of the Director, is in charge of all of our review processes, and will conduct reviews in accordance with F.B.I. procedures,” Mr. Patel wrote in an email to the bureau. “When and if further information is required, we will coordinate the responses. For now, please pause any responses.”
Mr. Patel, who has been an outspoken critic of the agency he now leads, later told F.B.I. agents during a videoconference that his response to Mr. Musk’s email was an example of how he had their backs, according to two people familiar with his remarks.
Empowered by President Trump, Mr. Musk and his teams have swarmed through the federal government, moving quickly and with blunt force. Mr. Trump has denied any tension between his billionaire adviser and the cabinet secretaries who are in charge of 2.3 million federal employees.
“ALL CABINET MEMBERS ARE EXTREMELY HAPPY WITH ELON,” the president wrote on social media on Wednesday morning.
Later that day, at his first cabinet meeting, Mr. Trump responded to a reporter’s question about possible tensions by asking his most senior aides, “Is anyone unhappy with Elon?” After a few awkward moments, Howard Lutnick, the commerce secretary, started clapping loudly. The rest of the cabinet members followed soon after with their own applause for Mr. Musk.
It was a collective endorsement under pressure and with Mr. Trump right there watching. Some of the secretaries looked uncomfortable as Mr. Musk lectured them about his activities at the president’s invitation.
And yet, it is those very cabinet secretaries who were dealing with the confusion and panic inside the government buildings they oversee as Mr. Musk’s actions ripple through the bureaucracy. Some have privately expressed frustration with the chaotic process, if not the ultimate goals of Mr. Musk’s moves.
At the Justice Department over the weekend, midlevel managers urged their personnel to wait for more instructions before responding. In the lobby of the Department of Veterans Affairs office in Portland, Ore., officials set up computers to allow employees to quickly dash off responses to Mr. Musk by the midnight deadline established by the billionaire.
“The lobby in bldg. 16 has five computers set up for staff who may need to access their email but do not have regular access to a computer,” a V.A. administrator wrote to his colleagues. “The lobby will be open until 9 p.m. tonight in case there are any staff who would like to take advantage of this.”
At a major Army base on Monday, two civilian employees came to their military commander nearly in tears as they struggled with how, or even whether, to respond to Mr. Musk’s email, a senior military official said.
One worker had a child with special needs and depended on the military’s health care system. Both employees feared that if they were fired, they would be unable to find another job with comparable pay and benefits anywhere else in the community, where the base is the major civilian employer.
Despite assurances from the commander, who repeated the Pentagon’s guidance to ignore Mr. Musk’s order, the two employees complied with the directive to summarize their week. They feared the consequences if they did not, the official said, asking for anonymity to discuss a sensitive situation.
To many current law enforcement officials, the demand from Mr. Musk, however short-lived, was the latest effort to intimidate the federal work force with threats of termination, at a time when the administration is trying to fire large swaths of employees without regard for civil service rules.
Mr. Musk defended his actions during his appearance at the cabinet meeting.
“I actually just call myself a humble tech support,” he said, a line he has used in most of his public appearances in the past month.
In fact, Mr. Musk’s team at the Department of Government Efficiency has been doing far more than tech support. Team members effectively shut down the U.S. Agency for International Development, leading to the firing of most of its employees. DOGE members have requested and received access to sensitive files at the Treasury Department. They have pushed for a purge of federal employees with a kind of buyout plan with the threat of termination.
At the cabinet meeting, Mr. Musk insisted that his actions were all designed to keep the country from going bankrupt by slashing 15 percent of the government’s overall spending. He said he received permission from Mr. Trump a week ago to threaten to fire any employee that did not respond about their workweek.
“The president encouraged me via Truth Social and also by a phone call to be more aggressive,” Mr. Musk told reporters. “And I was like, OK, yes, sir, Mr. President, we’ll indeed do that. The president’s the commander in chief. I do what the president asks. I said, ‘Can we send out an email to everyone, just saying, what did you get done last week?’ The president said yes. So I did that.”
His social media post on Saturday was followed quickly by an email from the Office of Personnel Management to every federal employee telling them they had a midnight deadline. (Some 48 hours later, adding to the confusion, the office said the directive was voluntary.)
Mr. Musk’s demands — and the surprising way they were delivered in a social media post on a Saturday — were initially rejected by more than half of the president’s cabinet.
The Department of Health and Human Services sent an email over the weekend saying that the leadership was working with personnel officials “on how best to meet the intent of yesterday’s notice to employees while being mindful of the sensitivity of the information and initiatives” at the department. “Employees are therefore directed to ‘pause’ activities in answering the OPM email,” it added.
Chris Wright, the secretary of energy, wrote to his employees: “The Department of Energy is responsible for reviewing the performance of its personnel and will conduct any review in accordance with its own procedures. When and if required, the Department will provide a coordinated response to the OPM email.”
Ambassador Tibor P. Nagy, a top official at the State Department, wrote that “No employee is obligated to report their activities outside of their Department chain of command.”
Still, if the top officials at those agencies still had reservations about Mr. Musk’s actions on Wednesday when they convened at the White House with Mr. Trump, they made no attempt to say so.
Secretary of State Marco Rubio sat next to the president and did not object when Mr. Musk described his effort. Mr. Wright made no comments either. And Robert F. Kennedy Jr., the health secretary, did not object to anything that Mr. Musk said.
“I think everyone’s not only happy; they’re thrilled,” Mr. Trump told reporters on behalf of the cabinet.
The applause came shortly after.
Devlin Barrett, and Maggie Haberman and Adam Goldman contributed reporting from Washington.