Here was a golden opportunity to keep potentially hundreds of people out of prison every year — and now it’s gone.

So much for the HOPE Court, a promising Cook County initiative that was shut down this year after repeated charges of judicial mismanagement and other problems, according to an investigation by Injustice Watch and City Bureau, published by the Sun-Times.

EDITORIAL

The HOPE Court, modeled on the widely lauded Hawaii Opportunity with Probation Enforcement program, used a carrot-and-stick approach —  drug treatment, therapy and other support, intensive court monitoring, and sanctions for breaking the rules — to keep probationers on track and out of prison.

Incarceration was a last resort, not a first. The criminal justice system would be used as a tool to reform lives, not ruin them. Meanwhile, taxpayers and the state stood to benefit down the road from reduced prison costs.

But the devil, as they say, was in the details.

In this case, one of those pesky details was a “bullying” judge who was clearly a poor fit, even failing to follow the HOPE program’s best practice recommendations.

Representatives from the public defender’s office, state’s attorney and probation department all recommended that she be reassigned. Yet Chief Judge Timothy Evans left Judge Jackie Portman-Brown in place.

There’s more to the story, but the big question is: Why couldn’t Cook County and the state find some way to salvage a program that has a track record elsewhere and has piqued the interest of researchers because of that success?

According to numbers supplied to Injustice Watch by Portman-Brown, 740 people successfully completed HOPE Court, and avoided prison, between 2015 and 2017.

Meanwhile, the average annual price tag to house an inmate in Illinois is $38,000, according to the Vera Institute for Justice.

The concept of criminal justice reform has support across the political spectrum, as we saw in many of the completed questionnaires submitted to this Editorial Board by candidates for the Illinois House and Senate in the Nov. 6 election.

Reformers have their work cut out for them, it seems.

Send letters to letters@suntimes.com