On November 26, 1991, the defendant pleaded guilty in the Superior Court in Middlesex County to two indictments charging him with breaking and entering a building in the daytime and possession of burglarious instruments. A Superior Court judge adopted the recommendation of the Commonwealth and imposed sentences of nine to ten years to be served at the Massachusetts Correctional Institution at Cedar Junction, the sentences to run concurrently with each other and concurrently with a sentence that the defendant was then serving at Cedar Junction.
On the day that the defendant was sentenced, the prosecutor entered into a written agreement with defense counsel. The prosecutor agreed to join defense counsel in support of a motion to revoke and revise the defendant’s sentences if the defendant was not paroled after serving a total of three years, provided, however, that the defendant did not have any major “D” reports against him during that period. It was, therefore, contemplated by both the prosecutor and defense counsel that, after the defendant had served three years with good behavior, defense counsel was to file a motion to revoke and revise the defendant’s sentences, and the prosecutor would support the motion.
In July, 1992, the defendant filed a pro se petition for a writ of habeas corpus alleging ineffective assistance of counsel. He claimed that his counsel had not filed a motion to revoke and revise his sentences as counsel had promised he would. The judge who sentenced the defendant denied his petition. The defendant filed a pro se appeal to this court.
In his petition, the defendant was seeking to be resentenced and was not demanding immediate release “on grounds distinct from the issues at the indictment, trial, conviction, or sentencing stage.” Averett, petitioner, 404 Mass. 28, 30 (1989). Therefore, instead of filing a petition for a writ of habeas corpus, the defendant should have filed a motion under Mass.R.Crim.P. 30, 378 Mass. 900 (1979). Ibid. *193See McCastle, petitioner, 401 Mass. 105, 107 (1987) (“there [was] no constitutional impediment to restricting [the petitioner] to rule 30 relief’). For that reason alone, the judge did not commit error when she denied the defendant’s petition.
Our inquiry does not stop here, however, because this appeal has brought to our attention a serious matter — a misinterpretation of Mass.R.Crim.P. 29, 378 Mass. 899 (1979). The misinterpretation pertains not only to the time when a motion to revoke and revise must be filed, but also as to the purpose of rule 29. As a result, there may have been an unintentional, but substantial, risk of injustice in this case.1
1. Time limits. In regard to the time limits within which a motion to revoke and revise must be filed, rule 29 (a) states, in pertinent part, as follows:
RULE 29.
Revision or Revocation of Sentence
(Applicable to District Court and Superior Court)
(a) Revision or Revocation. The trial judge upon his own motion or the written motion of a defendant filed within sixty days after the imposition of a sentence, . . . may, upon such terms and conditions as he shall order, revise or revoke such sentence if it appears that justice may not have been done.
“The rule establishes strict jurisdictional time limits for the filing of such motions.” Commonwealth v. Layne, 386 Mass. 291, 295 (1982). See Reporters’ Notes to Mass.R.Crim.P. 29(a), Mass. Ann. Laws, Rules of Crim. P. at 474 (Law. Co-op. 1979), which states: “The sixty-day period established by the rule is absolute, and the trial judge *194has no power to extend the time within which the motion must be filed . . . .” See also Commonwealth v. Cepulonis, 18 Mass. App. Ct. 919, 920 (1984) (Superior Court judge properly declined to consider a motion to revoke and revise a sentence, where motion was filed after the sixty-day period of limitation established by rule 29[a]).
In this case, the prosecutor and defense counsel agreed, in effect, to “waive” the sixty-day time limit established in rule 29(a) for filing the motion to revoke and revise the defendant’s sentences. This was error on both their parts.
The Massachusetts Rules of Criminal Procedure “govern the procedure in all criminal proceedings in the-. . . Superior Court.” Mass.R.Crim.P. 1 (b), 378 Mass. 842 (1979). As rules of court, they “are indispensable to the orderly and efficient conduct of a court’s business. They are not to be set aside ... by the caprice or design of counsel.” Commonwealth v. Cooper, 356 Mass. 74, 79 (1969). See also Commonwealth v. Soucy, 17 Mass. App. Ct. 471, 472 (1984) (“Counsel may not, by adopting certain practices, decide when the [Massachusetts Rules of Criminal Procedure] may be ignored with impunity”).2 Therefore, the prosecutor and defense counsel here could not agree to waive the sixty-day time limit for filing a motion to revoke and revise in this matter and the judge could not recognize such a waiver.
2. Purpose of rule 29. In addition, there appears to be a misunderstanding of the purpose of rule 29. The prosecutor stated in the agreement that “it is [his] understanding that the trial court will be receptive to granting a Motion to Revise and Revoke if Mr. Clark’s adjustment during incarceration is without significant problems.”
Rule 29 (a) states that a judge may revoke or revise a sentence “if it appears that justice may not have been done.” There are limitations, however, as to the facts that the judge may consider in reaching such a determination. “[Rule 29’s] purpose is to permit a judge to reconsider the sentence he has *195imposed and determine, in light of the facts as they existed at the time of sentencing, whether the sentence was just.” Commonwealth v. Layne, supra at 295 (emphasis original). It is improper, therefore, for a judge, in making the determination called for in rule 29 (a), to consider postsentence events.3
In any event, a judge may never consider allowing a motion to revoke and revise based on information concerning the conduct of the defendant during his incarceration following the sentence originally imposed by the judge. Such consideration would be a violation of art. 30 of the Massachusetts Declaration of Rights.4 If a judge revoked a sentence and revised it because of the defendant’s conduct while incarcerated, the judge then would be performing the function of a parole board. “Parole is a ‘wholly executive function.’ ” Stewart v. Commonwealth, 413 Mass. 664, 669 (1992), quoting from Baxter v. Commonwealth, 359 Mass. 175, 179 (1971), and, therefore, such action would' “effectively usurp[] the decision-making authority constitutionally allocated to the executive branch.” Stewart v. Commonwealth, supra, *196quoting from Commonwealth v. Gordon, 410 Mass. 498, 501 (1991).
The agreement is illegal and, therefore, void. According to the defendant’s affidavit which accompanied his petition for a writ of habeas corpus, he pleaded guilty, with the stipulation that his counsel would file a motion to revoke and revise his sentences. We think, in these circumstances, justice would be best served if the defendant were returned to Superior Court from the institution in which he is now incarcerated. He should be informed that the agreement entered into by the prosecutor and defense counsel is void. The judge should give the defendant a reasonable time to consider whether he desires to withdraw his guilty pleas, have his sentences revoked, and stand for trial or, in the alternative, plead guilty and be resentenced.
The order denying the petition for writ of habeas corpus is affirmed. Further proceedings shall be conducted in the Superior Court in accordance with this opinion.
So ordered.
This is one of those rare instances where it is appropriate for us to address an issue that was not raised by the parties. See Commonwealth v. Pares-Ramirez, 400 Mass. 604, 609 (1987); Commonwealth v. Paniaqua, 413 Mass. 796, 802 n.5 (1992).
Rules of court such as the Massachusetts Rules of Criminal Procedure cannot be disregarded by a judge. Empire Apartments, Inc. v. Gray, 353 Mass. 333, 337 (1967). Commonwealth v. Soucy, supra.
Commonwealth v. Layne, supra, did not state new law. In Commonwealth v. Sitko, 372 Mass. 305, 314 (1977), a decision interpreting G. L. c. 278, § 29C, the predecessor to rule 29, the court considered the type of information that a sentencing judge could consider in deciding a motion to revoke and revise a sentence. The court was concerned with certain additional information from the Federal Bureau of Investigation that the sentencing judge received after he imposed a sentence on the defendant. The court stated that “[i]f [the information] related to matters which occurred before the date of original sentencing, that information could be considered on the motion to revoke and revise if it appears that justice was not done in the sentencing. If the information related to postsentencing events, that information could not support a finding of some injustice in the original sentencing which would justify a revision of that sentence.” (Emphasis added.) Ibid.
Article 30 of the Massachusetts Declaration of Rights reads as follows:
“In the government of this Commonwealth, the legislative department shall never exercise the executive and judicial powers, or either of them: The executive shall never exercise the legislative and judicial powers, or either of them: The judicial shall never exercise the legislative and executive powers, or either of them: to the end it may be a government of laws and not of men.”