The circuit court of any county or city may, by order entered of record, allow persons confined in the jail of such county or city who are awaiting disposition of, or serving sentences imposed for, misdemeanors or felonies to work on (i) state, county, city or town property, (ii) any property owned by a nonprofit organization that is exempt from taxation under 26 U.S.C. § 501(c)(3) and that is organized and operated exclusively for charitable or social welfare purposes on a voluntary basis with the consent of the county, city, town or state agency or the local public service authority or upon the request of the nonprofit organization involved, (iii) private property that is part of a community improvement project sponsored by a locality or that has structures that are found to be public nuisances pursuant to §§ 15.2-900 and 15.2-906 provided that the court has reviewed and approved the project for the purposes herein and permits the prisoners to work on such project, (iv) any private property utilized by a nonprofit organization that is exempt from taxation under 26 U.S.C. § 501(c)(3), or (v) private property in any locality that meets the criteria under an ordinance adopted by such locality under § 15.2-908. The district court of any county or city may allow persons confined in the jail of such county or city who are awaiting disposition of, or serving sentences imposed for, misdemeanors to work on (a) state, county, city or town property, (b) any property owned by a nonprofit organization that is exempt from taxation under 26 U.S.C. § 501(c)(3) and that is organized and operated exclusively for charitable or social welfare purposes on a voluntary basis with consent of the county, city, town or state agency or the local public service authority or upon the request of the nonprofit organization involved, (c) private property that is part of a community improvement project sponsored by a locality or that has structures that are found to be public nuisances pursuant to §§ 15.2-900 and 15.2-906 provided that the court has reviewed and approved the project for the purposes herein and permits the prisoners to work on such project, (d) any private property utilized by a nonprofit organization that is exempt from taxation under 26 U.S.C. § 501(c)(3), or (e) private property in any locality that meets the criteria under an ordinance adopted by such locality under § 15.2-908. Prisoners performing work as provided in this paragraph may receive credit on their respective sentences for the work done, whether such sentences are imposed prior or subsequent to the work done, as the court orders.
The court may, by order entered of record, require a person convicted of a felony to work on state, county, city or town property, with the consent of the county, city, town or state agency or the local public service authority involved, for such credit on his sentence as the court orders.
In the event that a person other than the sheriff or jail superintendent is designated by the court to have charge of such prisoners while so working, the court shall require a bond of the person, in an amount to be fixed by the court, conditioned upon the faithful discharge of his duties. Neither the sheriff nor the jail superintendent shall be held responsible for any acts of omission or commission on the part of such person.
Any person committed to jail upon a felony offense committed on or after January 1, 1995, who receives credit on his sentence as provided in this section shall not be entitled to good conduct credit, sentence credit, earned sentence credit, other credit, or a combination of any credits in excess of that permissible under Article 4 (§ 53.1-202.2 et seq.) of Chapter 6 of this title. So much of an order of any court contrary to the provisions of Article 4 shall be deemed null and void.
Va. Code § 53.1-129