I did a little bit of research on this and, much to my surprise, there's a case directly on point, Esparza v. Commonwealth, (1999) No. 2602-97-1, which states that a judge can go back in and alter a sentence even if it was reached as part of a plea bargain. Of course, in keeping with constitutional requirements, the judge can only lessen the sentence. HOWEVER, the judge's ability to do so has some significant limitations.
Here's the pertinent part of the statute giving the judge such power.
§ 19.2-303.Basically, the first paragraph above gives the judge unfettered power to alter a sentence if its entirety (including suspended time) is less than 12 months. Since most felonies carry sentences of X number of years they put the defendant under the jurisdiction of the Department of Corrections and the second paragraph kicks in.
If a person is sentenced to jail upon conviction of a misdemeanor or a felony, the court may, at any time before the sentence has been completely served, suspend the unserved portion of any such sentence, place the person on probation for such time as the court shall determine, or otherwise modify the sentence imposed.
If a person has been sentenced for a felony to the Department of Corrections but has not actually been transferred to a receiving unit of the Department, the court which heard the case, if it appears compatible with the public interest and there are circumstances in mitigation of the offense, may, at any time before the person is transferred to the Department, suspend or otherwise modify the unserved portion of such a sentence. The court may place the person on probation for such time as the court shall determine.
In fact, I think every case which has gone before the appellate courts in Virginia which involves this statute has been over whether the trial court has jurisdiction. Their findings can be summed up as (1) the trial court loses jurisdiction if the offender has for any period of time been transferred to the Department of Corrections, (2) this statute does not give trial court jurisdiction if the offender received an entirely suspended sentence, and (3) the statute gives the trial court jurisdiction over anyone being incarcerated anywhere, however they got there, as long as they have not been transferred to the Department of Corrections.
Of course, even if the trial court has jurisdiction the reduction can only happen "if it appears compatible with the public interest and there are circumstances in mitigation of the offense."
Public Interest: Something in which the public, the community at large, has some pecuniary interest, or some interest by which their legal rights or abilities are affected. It does not mean anything so narrow as mere curiosity, or as the interests of the particular localities, which may be affected by the matters in question. Interest shared by citizens generally in affairs of local, state, or national government.The compatibility with the "public interest" prong is somewhat amorphous, but it clearly means something larger than the offender and her immediate family.
Offense: A felony or misdemeanor; a breach of the criminal laws; violation of law for which penalty is prescribed.
Sentence: The judgment formally pronounced by a court or judge upon a defendant after his conviction in a criminal prosecution, imposing the punishment to be inflicted, usually in the form of a fine, incarceration, or probation.
All definitions From Black's.
The rather huge barrier is the "there are circumstances in mitigation of the offense" prong. Note that it is specific. This is not about circumstances in mitigation of the sentence; it specifically states the circumstances must mitigate the offense. Therefore, all the offenders who want to come back to court in order to show how they've been models of good behavior since their conviction (gone to Bible class every day for the last 4 months and become a trustee) as well as those who want to get out because there has been some terrible family disaster which requires them to be out to help their family cannot fulfill this prong. There must actually be something which mitigates the offense of which they've been convicted.
Why would the General Assembly write such a constricted statute? Well, probably because Virginia has a very short period of time within which the court retains its jurisdiction. 21 days after the sentence is imposed the trial court loses its jurisdiction. This statute restores it for a period of time for a specific purpose. If the defendant gets some new evidence providing a perfect or imperfect defense before being transferred to the Department of Corrections (which can take months) he can return to court and get the judge to reduce the sentence or even suspend all of it. I'm not sure when this statute was adopted, but I think that for a long time before Virginia's General Assembly created a Writ of Actual Innocence (a few years ago after The Washington Post kicked a fuss) it was the only relief someone convicted could possibly have.
Currently, I think the statute has two purposes. The first is if there was there is evidence of an imperfect defense which was not known, raised, and considered at the time of conviction. The second purpose would be in a case wherein, in a very short period of time but after 21 days, evidence appears which proves the defendant is actually innocent. This statute allows a trial judge to suspend all of the defendant's time so that the defendant can file his Writ of Actual Innocence without being unjustly locked in jail.