Judging by the news of the last week, the federal government is running the wrong part of California justice system.

The feds are clinging tight to oversight of the prisons, even though, by many measures, the prisons in California are better than in many states. More resources have been devoted to prison health care. Facilities have been improved. Inmate populations have been significantly reduced. One would think the U.S. government might want to declare victory and go home. Instead, Gov. Brown is heading to court to get the prisons back.

While the prisons are improving, however, the courts are in a free fall. Cutbacks in services, delays, decaying facilities (and a raiding of construction funds) have raised fundamental questions about whether constitutional rights to counsel, speedy trial, and redress of grievances are being honored here.

The contrast between the state’s view of the prisons and the courts is instructive. State officials are arguing that the prisons meet constitutional standards, and they make a good case. But state officials – including the state chief justice – are themselves questioning whether the courts, after years of cuts, are up to the standard.

The financial realities are also mirror images. The state has been boosting spending on prison health care while it guts the courts. If only some of the additional money the feds have forced upon the prisons could go to the courts.

So maybe the solution to all this is as simple as a trade. The governor could make the offer: you give us back our prisons, we’ll give you our courts.