That seems to be trying to have it both ways.
If the underlying crime is psychiatric in nature, they shouldn't be sentenced to prison in the first place. They should be confined to a psychiatric hospital until they're "better".
It would be more honest civics - and probably more effective law-enforcement - to just sentence them to life-without-parole in the first place. [We can let out all the non-violent drug offenders to make room for them.
]
Given the recidivism rates, I don't have a problem with that.