On May 10, 1999, the petitioner, Kenny Mims, filed a petition for a writ of habeas corpus, which was subsequently amended on February 7, 2002. The amended petition raised claims in two counts. First, that the petitioner’s term of confinement has been illegally lengthened in violation of his state and federal constitutional rights to due process through the state’s failure to honor the plea bargain into which the petitioner entered with the state. Second, that the petitioner was deprived of receiving presentence confinement credit because of ineffective assistance of counsel.1 The amended return to count one, filed February 7, 2002, denies the petitioner’s due process claim. For the reasons subsequently set forth more fully, the petition shall be granted.
This matter came before the court for trial on March 25 and April 2, 2003. The sole witness was assistant state’s attorney Richard Colangelo. Additionally, the court received into evidence various exhibits, including several informations, transcripts and department of correction time sheets. The court has reviewed all of the testimony and evidence and makes the following findings of fact.
*330I
FINDINGS OF FACT
First, the petitioner was arraigned in docket number CR-97-0077276 (docket one) on May 16,1997. The petitioner posted bond on docket one on May 16, 1997.
Second, the petitioner was thereafter arraigned on docket numbers CR-97-0078186S (docket two) and CR-97-0078187 (docket three) on July 31, 1997. The petitioner was unable to post the $25,000 cash bond in each of these two dockets and was held in lieu of bond on dockets two and three for most of the time from July 31,1997, until sentencing. The bond on docket one was never changed.
Third, from July 31,1997, until the date of sentencing, the petitioner was not held in custody on a mittimus in docket one, nor was the bond increased in docket one, resulting in the petitioner never being held in custody on docket one prior to sentencing.
Fourth, docket numbers one, two and three were joined for the purpose of arriving at a plea agreement. The court offer of the petitioner receiving a sentence of fifteen years, execution suspended after eight years, was accepted by both the state and the petitioner. On October 14, 1998, the petitioner entered guilty pleas in dockets one, two and three.
Fifth, on November 13, 1998, the petitioner was sentenced, in accordance with the plea agreement, in each of the three dockets to a sentence of fifteen years, execution suspended after eight years, three years mandatory minimum, and five years probation. The sentences in dockets one, two and three were ordered to run concurrently with each other. Pursuant to the agreed upon sentence, the petitioner received a total effective sentence of fifteen years, execution suspended after *331eight years, three years mandatory minimum, and five years probation.
Sixth, on October 14,1998, when his guilty pleas were entered, the petitioner inquired of the court whether all time which should be counted (i.e., presentence confinement credit) would be applied toward his sentences. The court, Freedman, J., indicated to the petitioner that he would get credit for his presentence confinement, as long as the petitioner was held on bond, but that the department of correction was responsible for posting such credit.
Seventh, the department of correction has posted 403 days of presentence confinement credit to both dockets two and three, representing the time frames of July 31, 1997, to January 29, 1998, and April 7 to November 13, 1998. The department of correction has not posted any presentence confinement credit to docket one.
Eighth, on April 17, 2002, the petitioner moved the sentencing court under Practice Book § 43-22 to correct the sentence. The motion to correct the sentence was denied by the court, Kavanewsky, J., on December 2, 2002. The petitioner currently is appealing Judge Kavanewsky’s decision.2
Ninth, and finally, assistant state’s attorney Colangelo indicated to this court that he would not agree to the petitioner pursuing a sentence modification until after the present habeas corpus petition has been decided.3
*332II
DISCUSSION OF LAW
“Habeas corpus is the ultimate inquiry into the fundamental fairness of a criminal proceeding.” Summerville v. Warden, 229 Conn. 397, 421, 641 A.2d 1356 (1994). “[T]he writ of habeas corpus, as a vehicle to challenge a criminal conviction, is reserved for convictions that violate fundamental fairness. ... In order to be successful, a habeas corpus petitioner must demonstrate a miscarriage of justice or other prejudice and not merely an error which might entitle him to relief on appeal. . . . Thus, ordinarily a habeas corpus petitioner must establish some fundamental constitutional violation entitling him to relief.” (Citations omitted; emphasis added; internal quotation marks omitted.) Safford v. Warden, 223 Conn. 180, 190, 612 A.2d 1161 (1992).
“For a plea of guilty to be constitutionally valid, it must be equally voluntary and knowing. It cannot be truly voluntary unless the defendant possesses an understanding of the law in relation to the facts. An understanding of the law in relation to the facts must include all relevant information concerning the sentence. The length of time a defendant may have to spend in prison is clearly crucial to a decision of whether or not to plead guilty.” (Emphasis added.) Guadalupe v. Commissioner of Correction, 68 Conn. App. 376, 384, 791 A.2d 640, cert. denied, 260 Conn. 913, 796 A.2d 557 (2002); see also State v. Collins, 176 Conn. 7, 10, 404 A.2d 871 (1978).
“[T]he purpose of the ‘jail-time’ statutes is to give recognition to the period of presentence time served *333and to permit the prisoner, in effect, to commence serving his sentence from the time he was compelled to remain in custody due to a mittimus ... or because of the court’s refusal to allow bail or the defendant’s inability to raise bail.” (Emphasis added.) Holmquist v. Manson, 168 Conn. 389, 393-94, 362 A.2d 971 (1975). “[T]he term ‘sentence,’ ... as applied to multiple sentences imposed on multicount informations, refers to the aggregate or total effective sentence.” State v. Lombardo, 19 Conn. App. 631, 639, 563 A.2d 1030, cert. denied, 213 Conn. 808, 568 A.2d 793 (1989); see also State v. Raucci, 21 Conn. App. 557, 564, 575 A.2d 234, cert. denied, 215 Conn. 817, 576 A.2d 546 (1990).
“In order to make a knowing and voluntary choice, the defendant must possess an understanding of the law in relation to the facts, including all relevant information concerning the sentence. . . . The defendant also must be aware of the actual value of any commitments made to him by the court . . . because a realistic assessment of such promises is essential in making an intelligent decision to plead guilty.” (Citation omitted; internal quotation marks omitted.) State v. Garvin, 242 Conn. 296, 310, 699 A.2d 921 (1997).
“Due process requires that a guilty plea must be knowingly and voluntarily entered.” Braham v. Commissioner of Correction, 72 Conn. App. 1, 12, 804 A.2d 951, cert. denied, 262 Conn. 906, 810 A.2d 271 (2002). In State v. Garvin, supra, 242 Conn. 296, the defendant contended “that the plea agreement violated his right to due process because, if he did not have the right to withdraw his pleas after he failed to appear for sentencing, the plea agreement constituted an illusory contract.
“When a guilty plea is induced by promises arising out of a plea bargaining agreement, fairness requires that such promises be fulfilled by the state. . . . The same concept of fairness ordinarily impels the court, *334in its discretion, either to accord specific performance of the agreement or to permit the opportunity to withdraw the guilty plea. . . .
“The validity of plea bargains depends on contract principles. . . . Under the terms of the defendant’s plea agreement, in return for his guilty pleas, he received consideration in the form of the agreed upon sentence. One of the conditions of the agreement, however, was that the defendant appear for sentencing. Fulfillment of this condition was within the defendant's control. He understood at the outset that, if he failed to satisfy this condition, he nonetheless would be bound to the agreement. By holding the defendant to his guilty pleas, while imposing sentences reflecting his failure to appear, the trial court did no more than enforce the terms of the plea agreement. Accordingly, the defendant’s plea bargain did not violate due process . . . .” (Citations omitted; emphasis added; internal quotation marks omitted.) Id., 313-14; see also Medley v. Commissioner of Correction, 235 Conn. 413, 416, 667 A.2d 549 (1995); State v. Niblack, 220 Conn. 270, 283, 596 A.2d 407 (1991).
“We have long recognized that plea agreements are an essential and necessary part of the due administration of criminal justice. . . . While plea agreements are an essential part of the disposition of criminal cases, the right, duty and discretion of the trial judge to fashion an appropriate sentence in each case cannot be undermined by a plea agreement entered into between the parties. . . . Thus, while the state may bind itself to make a specific recommendation with respect to a criminal disposition, neither the state nor the defendant, nor a combination thereof, may compel the trial court to accept a suggested disposition arrived at between the parties. . . .
“When a guilty plea is induced by promises arising out of a plea bargaining arrangement, fairness requires *335that such promises be fulfilled by the state. . . . The same concept of fairness ordinarily impels the court, in its discretion, either to accord specific performance of the agreement or to permit the opportunity to withdraw the guilty plea.” (Citations omitted; internal quotation marks omitted.) Medley v. Commissioner of Correction, 35 Conn. App. 374, 377, 646 A.2d 242 (1994), rev’d in part on other grounds, 235 Conn. 413, 667 A.2d 549 (1995).
“Plea agreements are an essential and necessary part of the administration of justice; Santobello v. New York, 404 U.S. 257, 260-61, 92 S. Ct. 495, 30 L. Ed. 2d 427 (1971); and, without this vital process, the overburdened wheels of justice would nearly grind to a stop. Disposition of charges after plea discussions is not only an essential part of the process but a highly desirable part for many reasons. It leads to prompt and largely final disposition of most criminal cases; it avoids much of the corrosive impact of enforced idleness during pretrial confinement for those who are denied release pending trial; it protects the public from those accused persons who are prone to continue criminal conduct even while on pretrial release; and, by shortening the time between charge and disposition, it enhances whatever may be the rehabilitative prospects of the guilty when they are ultimately imprisoned. . . . This essential tool of the criminal justice system will lose its efficacy if the state’s performance of the agreement is contrary to the reasonable expectations of the defendant,. . . . Because a defendant waives several constitutional rights when [she] elects to plead guilty to a criminal offense, the choice of a guilty plea is of profound significance. . . .
“If the state makes promises to the defendant in order to induce a guilty plea, those promises must be fulfilled . . . and [t]he breaking of a promise made by the prosecutor as a result of plea negotiations is sufficient to invalidate a conviction. . . .
*336“Where, as here, there is a dispute as to the terms of a plea agreement, our analysis turns on the real intent of the parties, and most significantly, of [the defendant.] .... The defendant argues that she reasonably believed that the plea agreement terminated all her criminal liability flowing from the accident. Despite the state’s silence as to what would happen if the victim died, its conduct strongly implied that it shared the defendant’s interpretation of the plea agreement.” (Citations omitted; emphasis added; internal quotation marks omitted.) State v. Nelson, 23 Conn. App. 215, 218-19, 579 A.2d 1104, cert. denied, 216 Conn. 826, 582 A.2d 205 (1990), cert. denied, 499 U.S. 922, 111 S. Ct. 1315, 113 L.Ed. 2d 248 (1991).
“A cause of action for reformation of a contract rests on the equitable theory that the instrument sought to be reformed does not conform to the real contract agreed upon and does not express the intention of the parties and that it was executed as the result of mutual mistake, or mistake of one party coupled with actual or constructive fraud, or inequitable conduct on the part of the other. . . .
“On appeal, the standard of proof for reformation [is that the] evidence should be clear, substantial and convincing. . . . That standard of proof is sustained if the evidence induces in the mind of the trier a reasonable belief that the facts asserted are highly probably true, that the probability that they are true or exist is substantially greater than the probability that they are false or do not exist.” (Citations omitted; internal quotation marks omitted.) Traggis v. Shawmut Bank Connecticut, N.A., 72 Conn. App. 251, 258-59, 805 A.2d 105, cert. denied, 262 Conn. 903, 810 A.2d 270 (2002). “When a decision in an equitable matter lies within the trial court’s discretion, an appellate court will reverse that decision only when an abuse of discretion is manifest *337or where an injustice appears to have been done . . . .” (Internal quotation marks omitted.) Id., 264.
In the present matter, the petitioner does not seek to vacate any of his guilty pleas or convictions. Instead, the petitioner seeks the application of 403 days of presentence confinement credit to docket one so that the petitioner is incarcerated for a period of time corresponding with the imposed total effective sentence. In other words, the petitioner does not want to declare the contract void. He wants specific performance. The petitioner alleges that while his plea agreement entailed a to-serve portion of eight years, the effect of the department of correction not posting 403 days of presentence credit to docket one is that the petitioner’s to-serve portion of the total effective sentence is eight years plus 403 days. The petitioner would actually serve nine years, one month and eight days behind bars. Consequently, the to-serve portion is 403 days longer than the to-serve portion of the total effective sentence agreed upon by the petitioner and the state.
This court recognizes that the department of correction’s interpretation of the applicable statutes and case law (e.g., General Statutes § 18-98d and Payton v. Albert, 209 Conn. 23, 32, 547 A.2d 1 (1988)), which requires that each individual docket be examined for the presentence confinement credit applicable to that specific docket, and that the individual docket sentence which has the longest to run becomes the controlling sentence, is correct and is not being challenged in the present petition. In the present case, docket one has the longest to run because the department of correction cannot apply the 403 days of presentence confinement credit to docket one. The calculation of the discharge date based upon individual docket sentences results in the petitioner serving an eight year sentence on each *338individual docket that comprises the total effective sentence, yet serving more than one year longer than the total effective sentence.
The parties in the underlying criminal matter clearly intended to resolve dockets one, two and three by having the petitioner plead guilty in exchange for a total effective sentence of eight years to serve. The waiver of the petitioner’s constitutional rights when he elected to plead guilty is of profound significance. The petitioner’s guilty plea relieved the state of its enormous burden of proof at trial of proving beyond a reasonable doubt the elements of the offenses. It saved the state the expense of a trial. It eliminated the burden on victims and it led to a prompt and largely final disposition of the three underlying dockets. The petitioner had a reasonable expectation at the time he entered his guilty pleas that he would have ato-serve portion on the entire sentence (i.e., total effective sentence) of eight years. The performance of the agreement, which ultimately results in the petitioner serving eight years plus 403 days, is contrary to the petitioner’s reasonable expectations.
Based on the foregoing, this court concludes that the petitioner has shown that he had a reasonable expectation, based on the plea agreement entered into with the state, that he would serve no more than eight years on the total effective sentence imposed on dockets one, two and three. The length of time the petitioner expected to spend in prison, very likely the most crucial aspect of his decision whether or not to plead guilty, was eight years and not eight years plus 403 days. The petitioner was not able to make a realistic assessment, at the time he entered his guilty pleas, of the actual value of the indication that he would receive all presentence confinement credit he was entitled to. Such a realistic assessment is essential in making an intelligent decision to plead guilty. The petitioner reasonably expected the same amount of presentence confinement credit to be *339applied to each of the three individual dockets. Through the mechanics of how the discharge date is calculated, which are outside the petitioner’s control, by the department of correction, which was not a party to the plea agreement, the petitioner’s total effective sentence has become eight years plus 403 days. This result, while perhaps a correct interpretation of statute by the department of correction, nonetheless thwarts the intent of the parties as expressed by the plea agreement and results in both a violation of fundamental fairness and a miscarriage of justice.
Ill
CONCLUSION
Accordingly, the petition for a writ of habeas corpus is granted. The respondent is ordered to post 403 days of presentence confinement credit to docket one (docket number CR-97-0077276) and recalculate the petitioner’s discharge date.
On March 25, 2003, prior to the receipt of any evidence by this court, the petitioner made an oral motion to withdraw count two of the amended petition, which this court granted on that date. Consequently, the trial on the merits was only as to count one.
This court notes that the petitioner has not run afoul of Cobham v. Commissioner of Correction, 258 Conn. 30, 39, 779 A.2d 80 (2001), in which our Supreme Court “conclude [d] that, in order to challenge an illegal sentence, a defendant either must appeal the sentence directly or file a motion to correct the sentence pursuant to [Practice Book] § 43-22 with the trial court before raising a challenge for the first time in a petition for a writ of habeas corpus.” Consequently, the habeas petition was ripe for acjjudication.
This court would like to draw attention to the alternative ways in which the relief sought in this habeas corpus petition could have been pursued. The petitioner could have pursued a sentence modification with the sentencing judge and requested that the sentence in docket one be reduced by 403 days. Such a modification would have left intact the total effective sentence *332imposed for dockets one, two and three. The state has indicated an unwillingness to proceed on a sentence modification until the present habeas corpus petition has been decided. The petitioner could also have pursued a claim of ineffective assistance of counsel for underlying counsel’s failure to have the bond on docket one increased at the time the bonds were set on dockets two and three.