An adviser to the Foreign Intelligence Surveillance Court said Wednesday that the FBI’s plan to prevent further mistakes in secret applications to the court does not go far enough to ensure agents won’t repeat mistakes made during an investigation of President Trump’s 2016 campaign.

David Kris, who as a senior official in the Obama administration oversaw the Justice Department’s work with the court, was tasked last week with advising its judges on steps the FBI has vowed to take since an inspector general’s report found 17 significant errors and omissions in its applications in 2016 and 2017 to monitor former Trump adviser Carter Page.

FBI Director Christopher A. Wray promised to make changes, mostly involving additional training and layers of fact-checking by agents, to prevent such missteps from happening. Agents were investigating Page to see whether any Trump advisers conspired with Russia to interfere in the 2016 election.

Kris said Wray’s actions “point in the right direction, but they do not go far enough to provide the Court with the necessary assurance of accuracy, and therefore must be expanded and improved,” he wrote in a letter to the court.

An FBI spokeswoman declined to comment. In a previous filing to the court, Wray said the bureau “deeply regrets the errors and omissions” and “is committed to working with the Court and DOJ to ensure the accuracy and completeness of the FISA process.”

FISA is shorthand for the Foreign Intelligence Surveillance Act, the law that established a special court for handling the most sensitive national security cases involving suspected espionage and terrorism.

While much of the discussion before the FISA court is about the arcana of bureaucratic procedures and surveillance law, it has also generated a political debate about how the government uses its surveillance powers in cases involving politicians.

After Kris’s appointment, Trump tweeted: “You can’t make this up! David Kris, a highly controversial former DOJ official, was just appointed by the FISA Court to oversee reforms to the FBI’s surveillance procedures. Zero credibility. THE SWAMP!”

Trump has often criticized government officials who worked for the Obama administration, or during the Obama administration, accusing them of being part of an anti-Trump cabal. The inspector general report did not find evidence that FBI leaders acted out of political malice to investigate Trump and his campaign.

Kris spent years working on intelligence issues at the Justice Department, and in his first public statement as an adviser to the court, he signaled he would not be giving the FBI a pass.

“There can be no dispute about the legal, ethical, and practical reasons why the government must adhere to a strict duty of candor and accuracy before the Court. Nor can there be any dispute that the government has profoundly failed to meet that duty,” Kris wrote.

Kris argued that to ensure better FBI practices, Justice Department lawyers should be more directly involved in the training of agents on surveillance applications and in the drafting of applications, noting that the FBI, while part of the Justice Department, does not always work well with it.

“Historically, the FBI has not always worked cooperatively with DOJ, especially in foreign intelligence and national security matters,” Kris wrote.

The lawyer also argued it will be important for the FBI to make improvements to its work culture to focus more consistently on accuracy, even suggesting that the FISA court should hold more hearings in which agents are directly questioned about the factual claims in their applications.

“The Court should be sure to revisit the question of accuracy on a regular basis and at appropriate milestones,” Kris wrote. “Whether or not they recognize it, organizations like the FBI are constantly involved [in] a kind of cultural anamnesis, simultaneously forgetting and recalling their past.”