The petitioner appeals from the judgment denying his petition for a writ of habeas corpus. He claims that the habeas court erred in failing to conclude that his pleas were not knowing, intelligent, and voluntary (1) because of a misunderstanding by the trial court, the prosecutor and his defense counsel concerning the procedure whereby convicted sex offenders are committed to Whiting Forensic Institute (Whiting), and (2) because he was under the influence of medication at the time of the pleas. We find no error.
The following facts are relevant. On March 31,1981, the petitioner was arrested and charged with various sex offenses, kidnapping in the first degree and robbery in the first degree. His maximum exposure for the eight felonies was 120 years to life.
On April 13,1982, the petitioner pleaded guilty, pursuant to a plea agreement, to five counts of first degree sexual assault, two counts of first degree kidnapping, and one count of first degree robbery. Before accepting the petitioner’s guilty pleas, the trial court questioned him closely, as required by Practice Book § 711. During the plea canvass, the court made a commitment to recommend to the commissioner of correction that the petitioner be housed, “for whatever period of time he thought was reasonable, at the Whiting Forensic Institute.”
*174The trial court later sentenced the petitioner to thirty-years incarceration. At the petitioner’s sentencing hearing, the court made its promised recommendation to the commissioner of correction, but denied the petitioner’s motion for an examination by the Whiting staff to determine his eligibility for treatment at Whiting.
Since his sentencing, the petitioner has been confined in the state prison at Somers. He has not spent any time at Whiting Forensic Institute.
I
Before addressing the merits of the petitioner’s claims, we must consider the respondent’s contention that this court should dismiss the present petition under either the “successive petitions” or “abuse of writ” doctrines. The following procedural background is in order.
In January, 1983, the petitioner filed four pro se habeas petitions. The first petition1 alleged ineffective assistance of counsel; the second,2 breach of plea agreement; the third,3 failure to inform of maximum sentence. The fourth4 alleged that the pleas were invalid due to the petitioner’s mental condition. On January 24, 1984, the habeas court denied the first two petitions, and the court denied the petitioner’s request for certification to appeal. The third petition was withdrawn, and the fourth is the petition presently before this court.
Because the four petitions were filed contemporaneously, the fourth cannot be considered, in the simplest sense, “successive” to the others. Our review of the *175case file, however, reveals that the fourth was amended on February 7,1986, two years after the first and second petitions were decided. The grounds for relief stated in the amended petition are broader and better articulated than in the original petition. We must determine, therefore, whether the fourth petition, as amended, constitutes a successive petition or an abuse of writ so as to require the dismissal of the appeal.
“Decisions concerning abuse of the writ are addressed to the sound discretion of the trial court. ‘Theirs is the major responsibility for the just and sound administration of . . . collateral remedies, and theirs must be the judgment as to whether a second or successive application shall be denied without consideration of the merits.’ Sanders v. United States, 373 U.S. 1, 18, 83 S. Ct. 1068, 10 L. Ed. 2d 148 (1963).” Iasiello v. Manson, 12 Conn. App. 268, 271, 530 A.2d 1075, cert. denied, 205 Conn. 811, 532 A.2d 586 (1987). We note that the habeas court decided the present petition on the merits, and in its memorandum of decision referred to its prior decision on the other two petitions. Thus, the habeas court implicitly rejected the state’s successive petition theory. After reviewing the record, we conclude that the habeas court did not abuse its discretion in deciding the petition on the merits. Moreover, our conclusion is reinforced by the consideration that, to this point, none of the petitioner’s claims has received appellate review. We therefore turn to the merits of the petition.
II
Four grounds for relief are presented in the petition, all of which are variations on a theme, namely, that the petitioner’s pleas were not knowing, intelligent or voluntary. Three of the grounds are derived from the same set of facts, which we now relate.
*176At the petitioner’s plea canvass, the following colloquy took place:
“Mr. Lyons [state’s attorney]: May I add one other thing? May it be indicated that this is an agreed sentence?
“The Court: Okay. Thank you. Is that true, Mr. Lickson?
“Mr. Lickson [defense counsel]: I was going to interject that Your Honor has indicated in our discussions that the court would recommend, at the time of sentencing, that the sentence be carried out at the Whiting Forensic Center in Middletown.
“The Court: You understand that the commissioner of correction, by statute, is in charge of housing of persons who are incarcerated.
“Mr. Sherbo: Yes.
“The Court: The court can, however, recommend to the commissioner, and the commissioner will do as he sees fit. But I have told your attorney, and the record should indicate that your attorney, Mr. Lyons . . . and myself, have had extensive discussions about these cases, and during those discussions, I have indicated to them that if I were, in fact, to accept the recommendation of the state, as joined in by your attorney, I would recommend and suggest to the commissioner that he house you, for whatever period of time he thought was reasonable, at the Whiting Forensic Institute. Is that correct?
“Mr. Sherbo: Yes.
“The Court: Do you have any questions for me so far?
“Mr. Sherbo: No.”
*177At his sentencing, the petitioner, pursuant to General Statutes § 17-244,5 moved the court to order the Whiting staff to examine the petitioner in order to determine whether he would be a suitable candidate for treatment there. The court, in an exercise of its discretion and after determining that the petitioner was not mentally ill or dangerous to himself or others; see General Statutes § 17-244; denied the motion. The petitioner excepted. The court then sentenced the petitioner to thirty years to life. The following colloquy then occurred:
“Mr. Lickson [defense counsel]: Were you going to make a recommendation?
*178“The Court: Yes. I think these offenses were, obviously, committed by an individual who needs intensive rehabilitation prior to his being released from those offenses and I would urge the commissioner of correction make a serious effort to house this individual in an area or location where he can be given intensive rehabilitation as it, obviously, will be needed prior to any release.”
The three grounds discussed in this section are closely related. They are (1) that the petitioner was not aware of the actual value of the commitments made to him by the prosecutor and the trial court, (2) that he was misled by misrepresentations concerning the Whiting Institute commitment procedure, and (3) that he did not properly understand the applicable law because it was stated to him incorrectly.
A guilty plea, which is itself tantamount to conviction, may be accepted by the court only when it is made knowingly, intelligently, and voluntarily. Boykin v. Alabama, 395 U.S. 238, 89 S. Ct. 1709, 23 L. Ed. 2d 274 *179(1969). A guilty plea otherwise obtained is in violation of due process and voidable. State v. Childree, 189 Conn. 114, 119, 454 A.2d 1274 (1983); State v. Hackett, 16 Conn. App. 601, 602, 548 A.2d 16 (1988). To make a valid guilty plea, a defendant must have a full understanding of what his plea means; Boykin v. Alabama, supra; and be fully aware of the direct consequences, including the actual value of any commitments made to him by the court, the prosecutor, or his own counsel. Brady v. United States, 397 U.S. 742, 748 n.6, 90 S. Ct. 1463, 25 L. Ed. 2d 747 (1970).
The petitioner claims that, unbeknownst to him, the trial court’s commitment to recommend to the commissioner of correction that he should serve his sentence at Whiting was virtually worthless. As the defendant notes, under the proper procedure by which a trial court may commit a convicted person to Whiting, as provided by General Statutes § 17-244, the trial court makes no recommendation to the commissioner concerning Whiting because the commissioner of correction is not involved in the decision. The defendant’s reliance on that worthless promise in pleading guilty, he argues, rendered those pleas unknowing and involuntary. Brady v. United States, supra.
A defendant must be aware of the actual value of any commitments made to him by the court, prosecutor or his own counsel; id., 78; because a realistic assessment of such promises is essential in making an intelligent decision to plead guilty. This is not to say, however, that promises made by the court or the prosecutor must in every instance accurately reflect the applicable law. If any legal flaw in a promise does not mask the actual value of the promise, the legal flaw is harmless. For instance, a promise that is legally inaccurate, and thus unenforceable, will not present a ground for habeas relief if it was manifest and obvious at the time of the plea canvass that the promise was of little value in any *180event. Thus, the critical question is whether the value of the court’s promise, as reasonably perceived at the plea canvass, significantly exceeded the actual value of the promise.
The parties hotly contest the actual value of the court’s promise to recommend to the commissioner of correction that he house the petitioner, “for whatever period of time he thought was reasonable,” at Whiting. We need not decide this issue. Even if we assume, without deciding, that the actual value of the court’s promise was severely limited,6 the petitioner’s claim still fails because the record clearly reveals that the value of the court’s promise, on its face, was also severely limited. At the plea canvass, the court plainly stated that it did not have the authority to sentence the petitioner to serve all or part of his term in Whiting. We agree with the habeas court’s conclusion that the trial court’s statements were not words of guarantee. That the petitioner mistook the court’s promise to recommend that he be housed at Whiting for a guarantee is not, under these circumstances, a ground for habeas relief. Brady v. United States, supra, 756-57.
In order to prevail in a habeas corpus challenge, “the petitioner ‘must demonstrate a miscarriage of justice or other prejudice and not merely an error which might entitle him to relief on appeal. Hill v. United States, 368 U.S. 424, 428, 82 S. Ct. 468, 7 L. Ed. 2d 417, reh. denied, 369 U.S. 808, 82 S. Ct. 640, 7 L. Ed. 2d 556 (1962).’ D’Amico v. Manson, 193 Conn. 144, 156-57, *181476 A.2d 543 (1984).” Bowers v. Warden, 19 Conn. App. 440, 441, 562 A.2d 588, cert. denied, 212 Conn. 817, 565 A.2d 534 (1989). The petitioner has failed to make such a showing in this instance, and this claim has no merit.
The petitioner’s next two claims, namely, that he was misled by misrepresentations concerning the Whiting commitment procedure and that he did not understand the applicable law because it was stated to him incorrectly, are so closely related that we address them together. The key assumption underlying both claims is that the petitioner had a right to be informed, at his plea canvass, as to the proper procedure by which the trial court may commit sex offenders to confinement and treatment at Whiting. It is open to question, however, whether the law affords the petitioner such a right.
Before he can make a valid guilty plea, a defendant must be fully aware of the direct consequences of his plea. Brady v. United States, supra, 748. To ensure compliance with this constitutional mandate, Practice Book § 711 requires the trial court to advise the defendant of (1) the mandatory minimum and maximum possible sentences, (2) the maximum possible consecutive sentence, (3) the possibility of additional punishment imposed because of previous convictions, and (4) the fact that the particular offense does not permit a sentence to be suspended.
In Connecticut, as elsewhere, “the scope of ‘direct consequences’ is very narrow; J. Bond, Plea Bargaining and the Guilty Plea (2d Ed.) § 3.38”; State v. Gilnite, 202 Conn. 369, 383 n.17, 521 A.2d 547 (1987); and is limited to those consequences enumerated in Practice Book § 711. State v. Gilnite, supra. Except for those inquiries mandated by the constitution and court rule, the court is not obliged to assume the role of the *182defendant’s counselor; id., citing State v. Eason, 192 Conn. 37, 45, 470 A.2d 688 (1984); or to advise the defendant of every possible consequence of his guilty plea. State v. Gilnite, supra; see also, State v. Risk, 17 Conn. App. 447, 456, 553 A.2d 1145, cert. denied, 211 Conn. 802, 559 A.2d 1137, cert. denied, U.S. , 110 S. Ct. 72, 107 L. Ed. 2d 38 (1989). In light of these considerations, the possibility that the petitioner would be committed to Whiting unmistakably appears to be a collateral consequence of his pleas.7 The petitioner was not entitled, therefore, to be advised by the trial court as to the existence of, or the possible result of, this procedure.8
*183Our analysis cannot end here because the petitioner does not allege merely that the trial court failed to advise him of the existence of the Whiting commitment procedure. Rather, he claims that the trial court, his trial defense counsel, and the prosecutor misrepresented the nature of the Whiting commitment procedure and thus rendered his guilty pleas invalid. We disagree.
A guilty plea induced by misrepresentations, including unfulfilled or unfulfillable promises, is constitutionally unsound; Brady v. United States, supra, 755; because such misrepresentations interfere with the defendant’s ability to weigh realistically the state’s case and the likelihood of securing leniency through a plea bargain. Here, however, the petitioner has failed to show that the misinformation he received concerning incarceration at Whiting amounted to misrepresentations on the part of the trial court. The record reveals that no promises were made to the petitioner that he would serve his sentence at Whiting, and the trial court pointedly informed him that it was not within the court’s discretion to sentence him to incarceration at Whiting. As discussed above, we are not convinced that the trial court’s inaccurate portrayal of the Whiting procedure made it any more or less likely that the petitioner would plead guilty than would have been the case with an accurate portrayal of that procedure.
We reject the petitioner’s argument that the mere fact that he was misinformed as to the Whiting procedure vitiated his guilty pleas. The petitioner, facing a maximum exposure of 120 years to life, chose to plead guilty in return for an effective sentence of thirty years. Given the available alternatives, he made a wise choice. Under the facts of this case, the trial court’s misinfor*184mation concerning a collateral consequence of the petitioner’s guilty pleas does not constitute a violation of due process or a miscarriage of justice. See Brown v. Perini, 718 F.2d 784, 788-89 (6th Cir. 1988).
Ill
The petitioner’s last claim is that his pleas were not knowing, intelligent and voluntary because, at the time of his pleas, he was under the influence of prescription medication. This claim is meritless.
The habeas court found that for some time prior to his pleas, the petitioner had received 150 mg. of Mellaril and 100 mg. of Asendin daily. That court also noted that both psychiatrists who testified at trial agreed that the petitioner’s dosage of Asendin was too low to have any effect on his ability to understand the plea canvass proceedings, and that his dosage of Mellaril probably improved his judgment by reducing impulsiveness and allowing him to listen more receptively and to reason better. Cf. United States v. Buckley, 847 F.2d 991, 1000 (1st Cir. 1988), cert. denied, 488 U.S. 1015, 109 S. Ct. 808, 102 L. Ed. 2d 798 (1989) (use of lithium by manic-depressive defendant actually made him more rational and better able to plead). Further, the petitioner testified at his plea canvass that he, himself, noticed no effects of the medication.9
The petitioner has failed to show that the administration of these medications clouded his judgment so as to cause a miscarriage of justice. See id., 1000; Bowers v. Warden, supra, 441; see also State v. Morant, 20 Conn. App. 630, 633, 569 A.2d 1140 (1990).
There is no error.
In this opinion the other judges concurred.
Superior Court for the judicial district of Hartford-New Britain at Hartford, docket number 279364, dated January 4, 1983.
Superior Court for the judicial district of Hartford-New Britain at Hartford, docket number 279606, dated January 8, 1983.
Superior Court for the judicial district of Hartford-New Britain at Hartford, docket number 279607, dated January 8, 1983.
Superior Court for the judicial district of Hartford-New Britain at Hartford, docket number 279608, dated January 8, 1983.
General Statutes §§ 17-244 and 17-245 govern the trial court’s sentencing of convicted sex offenders, inter alia, to confinement and treatment at Whiting Forensic Institute. The procedure outlined in §§ 17-244 and 17-245 differs significantly from the process that the parties appear from the transcript to have envisioned at the plea canvass. Indeed, the central mystery of this case is why the parties and the trial court apparently overlooked these statutes at the plea canvass, yet properly applied them at the petitioner’s sentencing hearing.
General Statutes § 17-244 provides in pertinent part: “(a) Except as provided in section 17-255 any court prior to sentencing a person convicted of ... a sex offense involving (1) physical force or violence . . . may if it appears to the court that such person is mentally ill and dangerous to himself or others . . . upon request of any of the persons enumerated in subsection (b) of this section and a subsequent finding that such request is justified, order the commissioner to conduct an examination of the convicted defendant by qualified personnel of the institute. Upon completion of such examination the examiner shall report in writing to the court. Such report shall indicate whether the convicted defendant should be committed to the diagnostic unit of the institute for additional examination or should be sentenced in accordance with the conviction. . . .
“(b) The request for such examination may be made by the state’s attorney or assistant state’s attorney who prosecuted the defendant for an offense specified in this section, or by the defendant or his attorney in his behalf. . . .
“(c) Upon completion of the physical and psychiatric examination of the defendant, but not later than sixty days after admission to the diagnostic unit, a written report of the results thereof shall be filed in quadruplicate with the clerk of the court before which he was convicted . . . [and sub*178mitted] to the state’s attorney, to counsel for the defendant and to the office of adult probation.”
General Statutes § 17-245 provides in pertinent part: “(a) If the report recommends that the defendant be sentenced in accordance with the conviction, placed on probation by the court or placed on probation by the court with the requirement, as a condition of such probation, that he receive outpatient psychiatric treatment, the defendant shall be returned directly to the court for disposition. . . .
“(b) If the report recommends confinement at the institute for custody, care and treatment, the court shall set the matter for a hearing .... The defendant may waive the court hearing.
“(c) If at such hearing the court finds the defendant is not in need of custody, care and treatment at the institute, it shall sentence him in accordance with the conviction or place him on probation. ... If the court finds such person to be mentally ill and dangerous to himself or others and to require custody, care and treatment at the institute, it shall sentence him in accordance with the conviction and order confinement in the institute for custody, care and treatment provided no court may order such confinement if the report does not recommend confinement at the institute. The defendant shall not be subject to custody, care and treatment under this part beyond the maximum period specified in the sentence.”
Although we accept the petitioner’s contention, for argument’s sake, we note that the commissioner of correction, pursuant to §§ 17-194c through 17-194e and 17-194g, has broad authority to seek to transfer mentally ill inmates from penal institutions to hospitals in order to provide treatment for those found to be in need of it after sentencing. See State v. Gates, 198 Conn. 397, 405, 503 A.2d 163 (1986). Thus, the trial court’s recommendation that the commissioner provide the petitioner “intensive rehabilitation prior to [releasing him]” was not worthless.
Viewing the issue in terms beyond the bright line test of State v. Gilnite, 202 Conn. 369, 383 n.17, 521 A.2d 547 (1987), we note that the commitment procedure set out in General Statutes §§ 17-244 and 17-245 is a complex, multistage process involving the exercise of discretion by the trial court and the Whiting medical staff at numerous stages of the process. Even if the trial court, in the exercise of its discretion, agrees to initiate the § 17-244 procedure it is by no means guaranteed that the convicted offender will ultimately spend any time at Whiting. See State v. Gates, 198 Conn. 397, 503 A.2d 163 (1986). Prisoners are not entitled to be confined at Whiting; their placement there is at the discretion of the courts, the director of the Whiting Institute, and the commissioner of correction. See id.
“ ‘The distinction between “direct” and “collateral” consequences of a plea, while sometimes shaded in the relevant decisions, turns on whether the result represents a definite, immediate and largely automatic effect on the range of the defendant’s punishment.’ Cuthrell v. Director, Patuxent Institution, 475 F.2d 1364, 1366 (4th Cir.), cert. denied, 414 U.S. 1005, 94 S. Ct. 362, 38 L. Ed. 2d 21 (1973)”; George v. Black, 732 F.2d 108, 110 (8th Cir. 1984); United States v. Lambros, 544 F.2d 962, 966 (8th Cir. 1976), cert. denied, 430 U.S. 930, 97 S. Ct. 1550, 51 L. Ed. 2d 774 (1977). From the vantage point of the plea canvass, the result of a contemplated § 17-244 procedure cannot be considered definite or largely automatic. Thus, under either the Gilnite or Cuthrell test, the Whiting commitment procedure must be viewed as a collateral consequence of the petitioner’s guilty plea.
This conclusion is dispositive of the defendant’s claim that his plea was invalid because he did not understand the applicable law correctly. Although a defendant must understand the law in relation to the facts of the case before he can make a valid guilty plea; McCarthy v. United States, 394 U.S. 459, 89 S. Ct. 1166, 22 L. Ed. 2d 418 (1969); this requirement extends only to the defendant’s understanding of the nature of the charge; see id.; see also Henderson v. Morgan, 426 U.S. 637, 96 U.S. 2253, 49 L. Ed. 2d 108 *183(1976); and his understanding that at trial the state would have to prove all the elements of the charge beyond a reasonable doubt. See W LaFave and J. Israel, Criminal Procedure (1985) § 20.4 (c). Thus, the trial court was not required to advise the defendant of the law pertaining to the collateral aspects of his sentencing.
The following colloquy took place at the plea canvass:
“The Court: Are you under the influence of drugs or alcohol today in any way that would affect your ability to plead guilty?
“Mr. Sherbo: No.”