He called G.M.’s $900 million settlement “a shocking example of potentially culpable individuals not being criminally charged.” G.M. admitted that it misled the public about auto defects, but neither the company nor its executives were prosecuted, “despite the fact that the reprehensible conduct of its employees resulted in the deaths of many people.”

“The court is disappointed that deferred-prosecution agreements or other similar tools are not being used to provide the same opportunity to individual defendants to demonstrate their rehabilitation without triggering the devastating collateral consequences of a criminal conviction,” Judge Sullivan wrote.

Justice Department figures show deferred-prosecution agreements are rare for both individuals and companies. But the number of cases against organizations and companies is so tiny — 150 or so each year, compared with 160,000 or more individual prosecutions — that these deals occur at a much higher rate in corporate cases, which also tend to be higher profile.

Deferred-prosecution deals are attractive because they spare companies the consequence of criminal convictions, such as stock collapse and a loss of contracts. For people, the effects can be even more severe. The American Bar Association has identified tens of thousands of consequences of criminal conviction, which demonstrates how a single arrest can cost people their jobs and homes.

President Obama has indicated that he will make a criminal justice overhaul one of the most important issues of his remaining time in office. He became the first sitting president to visit a federal prison. On Thursday, he defended the Black Lives Matter movement, which has been criticized by police unions in particular as being anti-police. Mr. Obama plans to speak about changing the criminal justice system next week at the annual meeting of the International Association of Chiefs of Police in Chicago.

Much of the public debate has focused on reducing the prison population by cutting sentences for those serving long sentences for nonviolent crimes. Lost in the debate, Judge Sullivan said, has been the importance of keeping people out of jail in the first place. “This oversight is lamentable, to say the least!” he wrote.

He said criminal justice reform should offer people “the chance to demonstrate their true character and avoid the catastrophic consequences of felony convictions.”