For more than a year now, prisoners on Virginia’s death row have been allowed to shower daily, instead of three times a week. They can see their families weekly without a glass partition between them, and they take part in daily indoor or outdoor recreation.

Those changes were made in response to a lawsuit arguing that the isolated conditions on the state’s death row violate the Constitution’s mandate against cruel and unusual punishment. But a federal court ruled Friday that the concessions do not let the state off the hook. The lawsuit will continue.

U.S. District Judge Leonie M. Brinkema was convinced last year that the lawsuit was moot, acknowledging that the Department of Corrections had spent nearly $2 million to upgrade the death-row facilities.

A three-judge panel of the U.S. Court of Appeals for the 4th Circuit disagreed.

“Defendants have refused to commit to keep the revised policies in place and not revert to the challenged practices,” they wrote.

Now, the state prison system will have to go back to court if an agreement cannot be reached. Attorney Victor Glasberg represents the plaintiffs and said they hope to reach an agreement with government officials.

“In most cases like this, the government agrees to some kind of consent decree or a settlement,” said David Rudovsky, a civil rights lawyer who teaches at the University of Pennsylvania Law School. “It’s just a case where I think the district court made an error in giving too much credence to the defendants.”

The American Civil Liberties Union of Virginia celebrated the ruling, saying in a statement that “temporary relief of harsh, inhumane conditions in a state prison is not enough to cast aside a legal claim of unconstitutional treatment.”

The state Department of Corrections and the attorney general’s office declined to comment.

Under the old policies, prisoners slated for execution spent about 23 hours a day alone in a 71-square-foot prison cell and could see visitors only through a plexiglass wall. For one hour a day, five days a week, they were taken to an equally small “outdoor cell” with a concrete floor and no exercise equipment. They were barred from the recreational facilities used by other inmates.

Now, the six death-row prisoners at Sussex I State Prison in Waverly, Va., have their own yard with a basketball court and stationary exercise equipment, as well as an indoor recreation room with books and movies.

However, officials refused to come to a formal agreement mandating that the changes stay in place.

“Things might change in the future,” Assistant Attorney General Margaret Anne O’Shea argued in court last year. “If there’s an attempted escape next month, the department might need to temporarily go back on lockdown status.”

The state had previously argued that isolation was necessary to keep the death-row inmates from plotting escape or creating other conflicts. All six men awaiting execution in Virginia were convicted of murder.

A separate case challenged Virginia’s solitary confinement of death-row prisoners, on due-process grounds. The case died with the execution of the man who brought it, Alfredo Prieto, in 2015.