But recent studies show that replication efforts failed. They reduced neither rates of drug use nor crime.

Probation, writes Fiona Doherty, a clinical professor at Yale Law School, is “a hidden body of law” that needs scrutiny because judges and probation officers have wide latitude to define a defendant’s “good behavior.”

The Eldred case, which challenges that power, is, ironically, a continuation of the origins story for probation. In 1841, John Augustus, a teetotaling Boston bootmaker, described as the father of modern probation, posted bond for “a common drunkard.” By his death, he had supervised nearly 2,000 people, many arrested for intoxication, their records expunged in exchange for avowed sobriety.

Ms. Eldred’s lawyers rely on a 1962 United States Supreme Court case, Robinson v. California, which struck down a statute making it a crime for a person “to be addicted to the use of narcotics” — noting that while selling or possessing illegal drugs was against the law, the state could not punish people solely for the status of their illness.

But during the Eldred argument, the justices in Massachusetts noted that many offenders commit crimes to sustain their addictions. Shouldn’t judges order an addicted defendant to remain substance-free to prevent criminal behavior?

Indeed, prosecutors wrote, if the justices found that Ms. Eldred “did not have free will with regard to her drug use, this ‘compulsion’ may serve as an excuse to the drug-related larceny itself.”

Kelly Mitchell of the University of Minnesota Law School’s Robina Institute for Criminal Law and Criminal Justice, suggested a middle-ground solution. A judge could order the offender to be evaluated for substance use disorder and to follow treatment recommendations, she said. A violation, she said, would be for “failing to get the evaluation and to attend treatment, rather than failing to remain drug-free.”

For Julie Eldred, the requirement to stay drug-free was a disincentive for recovery. “Knowing that a relapse leads to a probation violation made it harder for me to talk about my struggles, for fear of being locked up,” she said.