WASHINGTON — In October, Elon Musk preached the message of government transparency during a presidential campaign rally he held in Pennsylvania in support of Donald Trump, suggesting that nearly all government records should be made public.

“There should be no need for FOIA requests,” Musk reiterated on social media, referring to the law that gives the public the right to obtain copies of federal agency records: the Freedom of Information Act. “All government data should be default public for maximum transparency.”

But Musk’s cost-cutting initiative, better known as the Department of Government Efficiency, or DOGE, appears to be heading in the opposite direction.

The White House has designated Musk’s office, United States DOGE Service, as an entity insulated from public records requests or most judicial intervention until at least 2034, by declaring the documents it produces and receives presidential records.

Katie Miller, an employee for the efficiency initiative, said on the social platform X that Musk’s office “was reorganized under the Executive Office of the President” and is now “subject to Presidential Records.”

That designation has a special legal meaning under a law called the Presidential Records Act. The law shields from the public all documents, communication trails and records from the president, his advisers and staff until five years after that president leaves office.

That law still requires presidents to keep a broad set of written materials created or received by them while executing their duties. Nonetheless, presidents can also dispose of their records after getting a written approval from the archivist at the National Archives, whom a president can remove from office.

On Friday, Trump fired the nation’s archivist, Colleen Shogan. No cause or reason was cited, Shogan said in a LinkedIn post announcing her dismissal.

In another effort that appears designed to deflect scrutiny, a Trump administration official said Tuesday that Musk plans to file a financial disclosure report to the White House, but it will remain confidential.

There has never been a White House staff member with the vast potential for conflicts like Musk, the world’s richest person and the head of leading companies in electric vehicles, space exploration and artificial intelligence.

But Musk is serving Trump as an unpaid “special government employee,” which means his financial disclosure is not required to be made public.

Special government employees, like all federal employees except the president and vice president, are prohibited under federal criminal law from taking actions that directly benefit themselves or their families, unless they have an ethics waiver.

Musk’s companies have billions of dollars in federal contracts and are the subject of more than a dozen pending federal regulatory investigations or lawsuits, so he will almost certainly need an ethics waiver, several former White House lawyers said.

The White House has not responded to a request from The New York Times for a copy of the waiver, a document that is required under federal law to be released. Ethics waivers are typically drafted based on conflicts identified through a financial disclosure filing, so it is possible that no waiver has been prepared yet.

On Tuesday, Trump made a rare appearance with Musk in the Oval Office on Tuesday before signing an executive order to continue downsizing the federal workforce.

Musk said there are some good people in the federal bureaucracy but they need to be accountable and called it an “unelected” fourth branch.

It was Musk’s first time taking questions from reporters since he joined the Trump administration. Despite concerns that he’s amassing unaccountable power with little transparency, Musk described himself as an open book. He joked that the scrutiny was like a “daily proctology exam.”

Meanwhile, watchdog groups are likely to challenge the secrecy surrounding Musk’s operation in lawsuits.

During Trump’s first term, federal courts recognized the president’s exclusive authority over presidential records by ruling against nonprofits that sought to stop his advisers from using private messengers that automatically delete messages after a certain period.

Critics are concerned that few oversight structures exist if Trump fails to preserve the records from Musk’s cost-cutting initiative.

“They are trying to insulate this entity and the enormous power it appears to be wielding from any kind of judicial interference and public scrutiny,” said Anne Weismann, a law professor at George Washington University who oversaw public records litigations at the Justice Department at the end of her two decades at the department.

If Trump chooses to get rid of all those records, there is not much recourse, she said, unless Congress decides to overhaul the Presidential Records Act.

Trump was known to tear up White House documents and leave them on the floor during his first term, according to several former staff members. Politico reported in 2018 that some administration officials even had to tape back together shredded documents to ensure compliance with federal laws.

Musk’s commercial aerospace company, SpaceX, has faced allegations that it has actively tried to avoid public records requests.

Associated Press contributed.