
990 A.2d 910 (2010)
120 Conn.App. 258
Nelson E. ARRIAGA
v.
COMMISSIONER OF CORRECTION.
No. 30272.
Appellate Court of Connecticut.
Argued November 30, 2009.
Decided March 30, 2010.
*912 David J. Reich, special public defender, for the appellant (petitioner).
Sarah Hanna, deputy assistant state's attorney, with whom, on the brief, were Michael Dearington, state's attorney, and James R. Turcotte, supervisory assistant state's attorney, for the appellee (respondent).
GRUENDEL, ROBINSON and SCHALLER, Js.
SCHALLER, J.
The petitioner, Nelson E. Arriaga, appeals from the judgment of the habeas court dismissing his petition for a writ of habeas corpus. On appeal, the petitioner claims that the court improperly concluded that it lacked subject matter jurisdiction over his petition and, in the alternative, that he was denied his due process rights as a result of the court's failure to appoint counsel to review his petition prior to the court's dismissal of his petition for lack of subject matter jurisdiction. We affirm the judgment of the habeas court.
Our review of the record reveals the following facts and procedural history. On July 10, 2008, the petitioner, representing himself, filed a petition for a writ of habeas corpus. The petitioner alleged in his petition that his counsel provided ineffective assistance by reason of counsel's failure to advise him properly of the immigration consequences of pleading guilty. At the same time, the petitioner filed a request for an appointment of habeas counsel. In his petition, the petitioner alleges that on October 27, 2004, he was sentenced to eighteen months in prison after pleading guilty to driving under the influence of intoxicating liquor or drugs and domestic assault.[1] The petitioner also alleged that he received a total effective sentence of *913 eighteen months in the custody of the respondent, the commissioner of correction, and received one month of credit for presentence confinement.[2] On July 22, 2008, the court, sua sponte, issued a judgment of dismissal pursuant to Practice Book § 23-29(1). The court found that the petitioner was discharged from his sentence for the challenged conviction no later than March 27, 2006. The petitioner sought as relief that the court vacate his guilty plea so that the conviction could not provide a basis for his deportation. The court determined that it had no jurisdiction over the matter pursuant to Ajadi v. Commissioner of Correction, 280 Conn. 514, 541, 911 A.2d 712 (2006) ("collateral consequences of the petitioner's expired convictions, although severe, are insufficient to render the petitioner in custody on those convictions and, therefore, to invoke the jurisdiction of the habeas court"). Thereafter, the court granted the petition for certification to appeal.
On appeal, the petitioner claims that the court improperly concluded that it lacked subject matter jurisdiction over his petition. Specifically, the petitioner argues that he was on probation for the underlying charges at the time he filed his petition with the habeas court.[3] The petitioner argues that we liberally should construe the rules of practice and not require him to allege in his petition that he was in custody or on probation at the time he filed his petition because he represented himself before the habeas court. The petitioner argues further that we can take judicial notice of his criminal record of the underlying convictions, which demonstrates that he was on probation at the time of his sentence. The respondent counters that the petitioner was required to allege in his petition that he was in custody and that this court, on review, is limited to the record before the habeas court in determining the subject matter jurisdiction of the habeas court. The respondent argues, therefore, that we cannot properly take judicial notice of the petitioner's underlying criminal record. We agree with the respondent that the petitioner was required to allege in his petition that he was in custody. We decline to take judicial notice of any documents not before the habeas court in this matter.
*914 To resolve the petitioner's claim, we begin by setting forth the standard of review as well as the relevant legal principles. "Our Supreme Court has long held that because [a] determination regarding a trial court's subject matter jurisdiction is a question of law, our review is plenary.... Moreover, [i]t is a fundamental rule that a court may raise and review the issue of subject matter jurisdiction at any time.... Subject matter jurisdiction involves the authority of the court to adjudicate the type of controversy presented by the action before it.... [A] court lacks discretion to consider the merits of a case over which it is without jurisdiction.... The subject matter jurisdiction requirement may not be waived by any party, and also may be raised by a party, or by the court sua sponte, at any stage of the proceedings, including on appeal." (Internal quotation marks omitted.) Gonzalez v. Commissioner of Correction, 107 Conn.App. 507, 511, 946 A.2d 252, cert. denied, 289 Conn. 902, 957 A.2d 870 (2008).
"A habeas court has subject matter jurisdiction to hear a petition for habeas corpus when the petitioner is in custody at the time that the habeas petition is filed." Young v. Commissioner of Correction, 104 Conn.App. 188, 191, 932 A.2d 467 (2007), cert. denied, 285 Conn. 907, 942 A.2d 416 (2008). Practice Book § 23-29 provides in relevant part: "The judicial authority may, at any time, upon its own motion or upon motion of the respondent, dismiss the petition, or any count thereof, if it determines that ... (1) the court lacks jurisdiction...."
"It is well settled that [t]he petition for a writ of habeas corpus is essentially a pleading and, as such, it should conform generally to a complaint in a civil action.... The principle that a plaintiff may rely only upon what he has alleged is basic.... It is fundamental in our law that the right of a plaintiff to recover is limited to the allegations of his complaint.... While the habeas court has considerable discretion to frame a remedy that is commensurate with the scope of the established constitutional violations ... it does not have the discretion to look beyond the pleadings and trial evidence to decide claims not raised." (Internal quotation marks omitted.) Young v. Commissioner of Correction, supra, 104 Conn.App. at 194, 932 A.2d 467.
"In ruling upon whether a complaint survives a motion to dismiss, a court must take the facts to be those alleged in the complaint, including those facts necessarily implied from the allegations, construing them in a manner most favorable to the pleader.... A motion to dismiss tests, inter alia, whether, on the face of the record, the court is without jurisdiction.... The conclusions reached by the [habeas] court in its decision to dismiss the habeas petition are matters of law, subject to plenary review.... Thus, [w]here the legal conclusions of the court are challenged, we must determine whether they are legally and logically correct ... and whether they find support in the facts that appear in the record." (Citation omitted; internal quotation marks omitted.) Id., at 193, 932 A.2d 467.
It is undisputed that the petitioner failed to allege in his petition that he was in custody, either actual confinement or on probation. The petitioner argues that we liberally should construe the rules of practice because he represented himself in the habeas court. "Although we allow pro se litigants some latitude, the right of self-representation provides no attendant license not to comply with relevant rules of procedural and substantive law.... A habeas court does not have the discretion to look beyond the pleadings and trial evidence to decide claims not *915 raised.... In addition, while courts should not construe pleadings narrowly and technically, courts also cannot contort pleadings in such a way so as to strain the bounds of rational comprehension." (Citations omitted; internal quotation marks omitted.) Oliphant v. Commissioner of Correction, 274 Conn. 563, 570, 877 A.2d 761 (2005). Even under a broad and liberal reading of his petition, nothing in the record suggests that the petitioner was in custody, including probation.[4]
The petitioner also argues that we should take judicial notice on appeal of his criminal record of the underlying criminal convictions he is challenging.[5] "The doctrine of judicial notice is not a hard and fast one. It is modified by judicial discretion.... Courts are not bound to take judicial notice of matters of fact. Whether they will do so or not depends on the nature of the subject, the issue involved and the apparent justice of the case." (Emphasis added; internal quotation marks omitted.) McCleave v. John J. Flanagan Co., 115 Conn. 36, 39, 160 A. 305 (1932). We decline to take judicial notice of the underlying criminal record because the petitioner had the burden of alleging facts in his petition that clearly demonstrate that he was in the custody of the respondent. Nothing in the record before us indicates that the petitioner was in the custody of the respondent at the time the petition was filed and, essentially, taking judicial notice of the underlying criminal records would require the habeas court or this court to conduct an independent investigation prior to dismissal of petitions pursuant to Practice Book § 23-29(1). See George M. v. Commissioner of Correction, 290 Conn. 653, 661, 966 A.2d 179 (2009) ("party seeking the exercise of the court's jurisdiction bears the burden of alleging facts that clearly demonstrate that it is the proper party to invoke judicial resolution of the dispute" [internal quotation marks omitted]). On the basis of our review of the record, we conclude that the habeas court correctly determined that the petitioner failed to allege sufficient facts to invoke the jurisdiction of the habeas court. See Young v. Commissioner of Correction, supra, 104 Conn.App. at 194, 932 A.2d 467.
The petitioner claims in the alternative that he was denied due process as a result of the court's failure to appoint counsel to review his petition prior to the court's dismissing his petition for lack of subject matter jurisdiction. He requests review under State v. Golding, 213 Conn. 233, 239-40, 567 A.2d 823 (1989).[6] Because *916 the court was authorized to determine subject matter jurisdiction based on the petition and to dismiss the petition if the facts alleged did not clearly demonstrate subject matter jurisdiction, accordingly, we need not consider this claim. See Gonzalez v. Commissioner of Correction, supra, 107 Conn.App. at 516, 946 A.2d 252 ("[T]he habeas court lacked subject matter jurisdiction to consider the petition. Even if we were to assume arguendo that these other claims had merit, they do not change the fact that the court simply lacked the authority or power to consider the petition."). Furthermore, the petitioner has failed to demonstrate, as required by Golding, that he had a constitutional right to counsel prior to the court's acting on his petition pursuant to Practice Book § 23-29(1); see Morgan v. Commissioner of Correction, 87 Conn.App. 126, 132, 866 A.2d 649 (2005) ("there is no constitutional right to counsel in habeas proceedings"); and that, as a result, he was clearly deprived of an existing constitutional right.
The judgment is affirmed.
In this opinion the other judges concurred.
NOTES
[1]  The petitioner did not cite the statute under which he was convicted and did not provide any records to the habeas court of such convictions.
[2]  Because the petitioner alleged that he was in jail for one month prior to his sentencing, we presume from this allegation, as did the habeas court, that the petitioner received presentence confinement credit of one month on his eighteen month sentence pursuant to General Statutes § 18-98d.
[3]  In view of our resolution of the claims in this appeal, we do not reach the question of whether serving a probation period constitutes "custody" for purposes of the writ of habeas corpus. We note, however, that the respondent does not argue in his brief that if the petitioner had alleged in his petition that he was on probation, the habeas court would not have subject matter jurisdiction. See Mock v. Commissioner of Correction, 115 Conn.App. 99, 101 n. 2, 971 A.2d 802, cert. denied, 293 Conn. 918, 979 A.2d 490 (2009); see also Ajadi v. Commissioner of Correction, supra, 280 Conn. at 538 n. 26, 911 A.2d 712 ("[I]t is well established that, in determining the scope of the writ of habeas corpus under state law, we look to the scope of the writ under federal law because both state and federal law governing the writ derive from the English common law.... [U]nder federal law, the term custody is synonymous with restraints of liberty ... including those restraints in place when the petitioner is on parole ... and when he is released on his own recognizance.... Accordingly, we [previously have] concluded that the legislature's use of the phrase deprived of his liberty in [General Statutes] § 52-466 was not intended to make the state writ of habeas corpus broader than its federal counterpart, but, rather, was merely intended to recognize that, historically, actual physical detention is not a jurisdictional prerequisite for bringing a writ of habeas corpus." [Citations omitted; internal quotation marks omitted.]).
[4]  Specifically, the petitioner did not include any indication that he had received a period of probation in addition to incarceration in his representation concerning his total effective sentence. In the affidavit attached to his petition, he requested the court to grant "a vacation of my charges or a reduction of my sentence to enable me to reunite with m[y] suffering family...." Although the petitioner's prayer for relief also sought to have the court "[l]et me withdraw my guilty plea" and "[o]rder [a] new trial or release me," this language is not sufficiently clear to satisfy his obligation to inform the court that he was on probation.
[5]  The petitioner, in the appendix to his brief on appeal, has attached copies of what purport to be his criminal record relating to his underlying petition. We will not consider documents outside the habeas court record to determine whether the petitioner was in custody at the time he filed his petition. See Young v. Commissioner of Correction, supra, 104 Conn.App. at 194, 932 A.2d 467 ("we review the actions of the habeas court on the record and may not consider extraneous material later submitted directly to us").
[6]  Golding permits a defendant to "prevail on [an unpreserved] claim of constitutional error... only if all of the following conditions are met: (1) the record is adequate to review the alleged claim of error; (2) the claim is of constitutional magnitude alleging the violation of a fundamental right; (3) the alleged constitutional violation clearly exists and clearly deprived the defendant of a fair trial; and (4) if subject to harmless error analysis, the state has failed to demonstrate harmlessness of the alleged constitutional violation beyond a reasonable doubt." (Emphasis in original.) State v. Golding, supra, 213 Conn. at 239-40, 567 A.2d 823.
