WASHINGTON  Everything was rolling along traditional lines. A bank broke the rules. The government found out. The company agreed to pay a fine and improve its behavior.

And then the judge assigned to approve the deal blew his top.

In a scene that is becoming increasingly common, Judge Emmet G. Sullivan of Federal District Court chewed out federal prosecutors at a hearing in Washington last week for a proposed settlement with Barclays.

“Why isn’t the government getting tough with banks?” he asked.

Just one day earlier in the same courthouse, Judge Ellen Segal Huvelle refused to sign a settlement between the government and Citigroup, demanding, “Why would I find this fair and reasonable?” She ordered government lawyers to return with answers next month.

The scoldings from the bench are a striking departure from a long tradition of judicial deference to settlements formulated by federal agencies, reflecting broad disenchantment not just with Wall Street, but with its government overseers.