The San Francisco district attorney’s office did not object when a judge using a faulty risk-assessment report released a man with a serious criminal record — a man who days later allegedly murdered a stranger on Twin Peaks, according to a court transcript released Tuesday.

The defendant, 19-year-old Lamonte Mims of Patterson (Stanislaus County), appeared in court July 11 after being charged with being a convicted felon in possession of guns. He was already on probation for burglary in San Francisco, and city prosecutors asked for that probation to be revoked.

But San Francisco judges have for more than a year been provided advice on whether to release a defendant before trial based on a computer algorithm that seeks to quantify their risk of committing further crimes or fleeing. In this case, officials said, the “public safety assessment score” was miscalculated, and Mims was wrongly recommended for release.

Five days after his release from jail, Mims and an accomplice, 20-year-old Fantasy Decuir of San Francisco, allegedly killed photographer and film scout Edward French in a robbery on Twin Peaks. Both stand accused of murder.

The transcript of the July 11 hearing shows that Assistant District Attorney Ryan King knew of Mims’ criminal record and requested a future hearing to revoke his probation, but did not object to the recommendation that Mims be released into a pretrial diversion program. King asked for a high level of supervision.

“Mr. King, what is your position with regard to Mr. Mims’ custody status?” Superior Court Judge Sharon Reardon asked.

“Your Honor, I’ve reviewed the public safety assessment,” King replied. “It appears to take into consideration all the materials in my file as well as the motion to revoke. That being said, I believe that in the event that Mr. Mims is released that he should have to report at least initially four times per week until we can establish some sort of pattern of behavior.”

Reardon then granted Mims’ release, without requiring bail, and referred him to what is known as assertive case management.

The victim’s sister, Lorrie French of San Francisco, reviewed the court transcript Tuesday and said she was dismayed that the prosecutor had not argued against the recommendation for release. She said she was shocked at what she called a series of missteps in the case — the miscalculation, the prosecutor’s decision not to challenge it and the judge’s decision to abide by it.

“I am so sick of this city and all its screw-ups,” Lorrie French said. “I understand there are people who really don’t belong in jail. But a convicted felon, found in a car with two guns, who has violated his probation not once, but twice?”

King and the defense attorney had access to Mims’ record, which included convictions in San Francisco and San Mateo counties for burglary, identity theft and receiving stolen property. But they apparently did not realize that Mims’ public safety assessment score, or PSA score, had been mistakenly low, understating the risk of releasing him.

The score is calculated by a city-funded nonprofit group, the Pretrial Diversion Project, which uses a complex computer program created by the Laura and John Arnold Foundation of Texas. The idea of the algorithm is to improve on the traditional bail system, in which bail amounts are based primarily on a defendant’s charges, regardless of the person’s ability to pay.

A spokesman for the district attorney’s office, Max Szabo, said Tuesday that the Pretrial Diversion Project “made a miscalculation that several entities relied upon, and we are working with our partners to ensure these scores are properly calculated going forward. When a PSA score is properly calculated, unlike money bail, it can provide a statistically significant prediction of pretrial failure.”

Nancy Rubin, interim director of the Pretrial Diversion Project, wrote in a letter to the court Tuesday that a staff member had mistakenly omitted the fact that Mims had been incarcerated in the past. As a result, Mims received a score of 4 rather than 5 on a 6-point scale that quantified his risk of committing a crime if released.

That was the difference between a recommendation of release with routine check-ins and a recommendation of no release. Rubin said she would retrain her staff and that the group was committed to its work.

District Attorney George Gascón was among many city criminal justice leaders who advocated for bringing the risk-assessment tool to San Francisco, though his prosecutors have sometimes disagreed with the recommendations. Gascón has said pretrial release should be determined by whether a defendant is a public safety or flight risk, not according to ability to afford bail.

Mims pleaded no contest to felony car burglary and misdemeanor identity theft in July 2016 in San Mateo County, and he was placed on felony probation. He was then arrested in November in connection to three car break-ins in the Twin Peaks parking lot and was ultimately placed on misdemeanor probation in San Francisco after pleading guilty to burglary and receiving stolen property.

His November arrest was considered a violation of his San Mateo County probation, and he was sentenced to six months in jail. He served three months, with three months credit for good behavior. He remained free until July 4, when San Francisco police said they found him in a car with another man and two guns.

After being released and allegedly killing French on July 16, Mims joined Decuir in robbing a man and woman at gunpoint near St. Mary’s Cathedral on Gough Street on July 28, authorities said.

Prosecutors say they have surveillance video of Decuir pulling the trigger on Twin Peaks, and that Mims implicated himself in the killing as well, making statements to police indicating he was involved in robbing French.

Lorrie French said Mims should have been behind bars at the time.

“My brother is gone,” she said. “I can’t bring him back. But there have to be some repercussions. Someone has to be held accountable.”

Vivian Ho is a San Francisco Chronicle staff writer. Email: vho@sfchronicle.com Twitter: @VivianHo