Red Onion State Prison in Wise County, Va. (David Crigger/Bristol Herald Courier/Associated PRess)

VIRGINIA HAS come a long way since advocates called attention to the state’s appalling practice of routinely condemning prisoners to the hell of solitary confinement, particularly in the Red Onion supermax prison. But there is still a ways to go. Isolation can have debilitating effects on human beings: Death-row inmates have reported that their impending execution does not upset them nearly as much as the prospect of continued, prolonged isolation, which often amounts to mental torture.

According to Virginia legislators who have been fighting solitary confinement, “step-down” programs have cut the number of prisoners who are nearly totally isolated. Instead of keeping difficult prisoners in small cells, alone, almost all the time, problem inmates can earn their way out, with restrictions gradually loosened to ensure safety.

Following a high-profile lawsuit on behalf of Alfredo R. Prieto, a death-row inmate who was executed in October, the state has also reportedly set about improving conditions for those in solitary, as everyone on death row is in Virginia. They are getting more out-of-cell time with other people and some basic facilities that will allow them more contact with the outside world.

These are both successful strategies that states across the country, increasingly aware that solitary is an expensive, barbaric practice, are taking toward common sense.

Another is ending the practice of isolating juveniles, who are particularly at risk of mental damage when pulled out of the general prison population. This is a reform that state Sen. Barbara A. Favola (D-Arlington) wants Virginia to pursue. She has pushed a modest bill that commands state corrections officials to rethink how and when they deny juveniles contact with others. Rather than tell prison officials precisely how to cut back on juvenile isolation, it would merely require them to write regulations that “allow the use of room segregation only when other less restrictive options have been exhausted,” with an emphasis on using isolation to ensure safety rather than as a routine punishment.

The rules would require that juveniles be isolated for the minimum amount of time necessary, that they be regularly checked up on, that they have direct access to staff, and that corrections officials develop a plan to improve the behavior of each isolated juvenile prisoner rather than just locking them away. If young prisoners exhibit mental-health issues — as state statistics indicate many do — corrections officials would have to take special care.

The bill is eminently reasonable. As with other reforms Virginia has pursued, it is puzzling that corrections officials ever devised a system that worked differently. They should take as an example President Obama’s recent actions to curb solitary in federal prisons. States lock up many more people than does the federal government, making efforts like Ms. Favola’s the front line in improving the way the country treats its young prisoners.