***********************************************
    The “officially released” date that appears near the be-
ginning of each opinion is the date the opinion will be pub-
lished in the Connecticut Law Journal or the date it was
released as a slip opinion. The operative date for the be-
ginning of all time periods for filing postopinion motions
and petitions for certification is the “officially released”
date appearing in the opinion.

   All opinions are subject to modification and technical
correction prior to official publication in the Connecticut
Reports and Connecticut Appellate Reports. In the event of
discrepancies between the advance release version of an
opinion and the latest version appearing in the Connecticut
Law Journal and subsequently in the Connecticut Reports
or Connecticut Appellate Reports, the latest version is to
be considered authoritative.

   The syllabus and procedural history accompanying the
opinion as it appears in the Connecticut Law Journal and
bound volumes of official reports are copyrighted by the
Secretary of the State, State of Connecticut, and may not
be reproduced and distributed without the express written
permission of the Commission on Official Legal Publica-
tions, Judicial Branch, State of Connecticut.
***********************************************
    ROBERT V. PENTLAND III v. COMMISSIONER
                OF CORRECTION
                   (AC 39161)
                        Keller, Prescott and Bear, Js.

                                   Syllabus

The petitioner, who had been convicted of two counts of the crime of
   witness tampering, sought a writ of habeas corpus, claiming that he had
   been denied the effective assistance of trial counsel. In connection with
   his conviction of witness tampering, the petitioner had been sentenced
   to one year incarceration, which he served from December, 2010 to
   December, 2011, and during that time, he was held in lieu of bond for
   certain other charges that stemmed from a sexual assault. After he
   completed his one year sentence on the witness tampering conviction,
   he continued to be held in lieu of bond on the sexual assault charges,
   of which he was convicted in 2012 and sentenced to a term of incarcera-
   tion that he was serving when he filed his habeas petition in May, 2015.
   The habeas court rendered judgment dismissing that petition, sua sponte,
   for lack of subject matter jurisdiction, concluding that it lacked jurisdic-
   tion to hear the petition because the petitioner had not been in custody
   for the witness tampering conviction when the petition was filed. Follow-
   ing the granting of certification, the petitioner appealed to this court.
   He claimed that because he has remained incarcerated on one or the
   other sentence since June, 2010, the sentences should be treated as
   consecutive sentences or a continuous stream of sentences, and that
   he should be considered to be in custody for jurisdictional purposes on
   both sentences for the duration of the aggregate term. Held that the
   habeas court properly dismissed the habeas petition, the petitioner hav-
   ing failed to allege sufficient facts to establish the habeas court’s subject
   matter jurisdiction over his habeas petition: even if this court were
   persuaded by the petitioner’s argument that he was in custody, the
   record was devoid of specific facts alleged by the petitioner that could
   have established the habeas court’s jurisdiction, as the facts alleged by
   the petitioner concerning his sentences, dates of confinement and pre-
   trial confinement credit were alleged in his brief to this court and were
   not alleged or proven before the habeas court, and the facts alleged in
   the habeas petition were insufficient to prove his claim; moreover, the
   habeas court did not have an obligation to grant a hearing prior to
   dismissing the habeas petition, as that was not required by the rule of
   practice (§ 23-29) that permits the habeas court to dismiss a petition
   sua sponte if it determines that it lacks jurisdiction, and the petitioner
   did not file any motion or other pleading in the habeas court alleging
   that he was entitled to a hearing.
          Argued May 25—officially released September 26, 2017

                             Procedural History

   Petition for a writ of habeas corpus, brought to the
Superior Court in the judicial district of Tolland, where
the court, Oliver, J., rendered judgment dismissing the
petition; thereafter, the court, Oliver, J., denied the
petition for certification to appeal, and the petitioner
appealed to this court; subsequently, the court, Oliver,
J., granted the petitioner’s motion for permission to file
a late amended petition for certification to appeal and
for reconsideration of the denial of the petition for
certification to appeal; thereafter, the court, Oliver, J.,
granted the amended petition for certification to
appeal. Affirmed.
   Jennifer Bourn, assistant public defender, for the
appellant (petitioner).
   James A. Killen, senior assistant state’s attorney,
with whom, on the brief, were Patrick Griffin, state’s
attorney, and Adrienne Maciulewski, deputy assistant
state’s attorney, for the appellee (respondent).
                          Opinion

   PRESCOTT, J. The petitioner, Robert V. Pentland III,
appeals from the judgment of the habeas court dismiss-
ing his petition for a writ of habeas corpus.1 On appeal,
the petitioner claims that the court improperly dis-
missed his petition for lack of subject matter jurisdic-
tion on the basis of an erroneous conclusion that he
was not in the custody of the respondent, the Commis-
sioner of Correction, on the challenged conviction when
he filed his petition, as required by General Statutes
§ 52-466. We conclude that the petitioner did not allege
sufficient facts in his petition to establish the habeas
court’s subject matter jurisdiction to hear his petition.
Accordingly, the judgment of the habeas court is
affirmed.
   We begin by setting forth the relevant procedural
history. On May 22, 2015, the petitioner, representing
himself, filed a petition for a writ of habeas corpus
challenging his 2011 conviction for two counts of wit-
ness tampering. The petitioner alleged in his petition
that his conviction was illegal because, inter alia, he was
denied the effective assistance of counsel. On March
29, 2016, the habeas court, Oliver, J., sua sponte, dis-
missed the petition pursuant to Practice Book § 23-29
(1),2 concluding that it did not have jurisdiction to hear
the petition because the petitioner had not been in
custody for the witness tampering conviction at the
time he filed his petition. The court did not set forth
the factual basis for this conclusion and did not hold
a hearing prior to its sua sponte dismissal of the petition.
   The self-represented petitioner filed a petition for
certification to appeal on April 7, 2016. The court, Oliver
J., denied the petition for certification on April 12, 2016.
The petitioner thereafter filed the present appeal on
May 2, 2016, and was appointed appellate counsel. On
September 14, 2016, the petitioner’s appellate counsel
filed a motion for permission to file a late amended
petition for certification to appeal and for reconsidera-
tion of the denial of the petition for certification to
appeal, arguing that counsel had identified grounds for
challenging the habeas court’s determination that it did
not have jurisdiction to hear the petition for a writ of
habeas corpus. The court, Oliver, J., granted the
motion, allowed the petitioner’s counsel to file a new
petition for certification, and granted the amended peti-
tion for certification to appeal on September 14, 2016.
  We now turn to the state of the factual record before
us. Except in other circumstances which are inapplica-
ble here, ‘‘[i]n 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.’’
(Internal quotation marks omitted.) Lebron v. Commis-
sioner of Correction, 274 Conn. 507, 512, 876 A.2d
1178 (2005).
   In deciding whether to sua sponte dismiss the peti-
tioner’s habeas petition, the court was required, under
the circumstances of this case, to take the facts to be
those alleged in the petition. See id. The facts alleged
by the petitioner in his May 22, 2015 habeas petition,
however, were quite sparse in regard to the issue of the
court’s jurisdiction. Specifically, the petitioner alleged
that he was serving a sentence for two counts of witness
tampering, that he was arrested in December, 2010, and
was sentenced in ‘‘summer, 2011,’’ to a total effective
sentence of one year of incarceration. Because the court
did not hold, and the petitioner did not request, a hear-
ing on the issue of the court’s subject matter jurisdic-
tion, the record before us is limited to those facts alleged
in the petitioner’s habeas petition.
   On appeal, the petitioner attempts to remedy the
dearth of facts in the record by alleging the following
facts in his brief to this court, most of which are not
alleged in his habeas petition. Following a trial to the
court, the petitioner was convicted of two counts of
witness tampering in violation of General Statutes
§ 53a-151 (witness tampering conviction). He was sen-
tenced on both counts on December 9, 2011 to a total
effective sentence of one year of incarceration. He
served his sentence from December 20, 2010 to Decem-
ber 19, 2011. During his sentence, however, the peti-
tioner also was being held in lieu of bond for several
other charges pending at that time. The charges
stemmed from his sexual assault of a minor that
occurred from 1998 to 2009 (sexual assault charges).
After he completed his sentence of one year of incarcer-
ation on the witness tampering conviction, he continued
to be held in lieu of bond on the sexual assault charges.
   On February 16, 2012, the petitioner pleaded guilty
under the Alford doctrine3 to the sexual assault charges
and was sentenced by the court, Fasano, J., on May
22, 2012, to a total effective term of eighteen and one-
half years incarceration and twenty-five years proba-
tion. In addition, the petitioner was granted eligible
pretrial confinement credit on the sexual assault
charges dating back to June 1, 2010, the date on which
he was arrested on those charges. The pretrial confine-
ment credit, however, did not include the time the peti-
tioner was being held as a sentenced prisoner on his
witness tampering conviction from December 20, 2010
to December 19, 2011.4
   The petitioner now claims on appeal that the habeas
court improperly concluded that it lacked jurisdiction
over his petition for a writ of habeas corpus. Specifi-
cally, the petitioner claims that the court improperly
failed to recognize that the custody requirement embod-
ied in § 52-466 was satisfied because he was serving
one continuous stream of sentences when he filed his
petition. The petitioner argues that his continuous
stream of sentences, which he deems equivalent to con-
secutive sentences, should be viewed as one aggregate
term, and, accordingly, that he should be considered
to be in custody for jurisdictional purposes on both
sentences for the duration of that aggregate term. In
other words, the petitioner argues that because his pre-
trial confinement credit that applied to the sentence on
his sexual assault charges was reduced by the one year
that he spent serving his witness tampering sentence,
and because he has remained incarcerated on one or
the other sentence since June 1, 2010, the sentences
should be treated as consecutive sentences. Thus, the
petitioner argues that, viewing both sentences in the
aggregate, the habeas court had subject matter jurisdic-
tion over his witness tampering conviction because he
effectively was in custody on that conviction when he
filed the petition, even though he had completed the
one year sentence. The petitioner further argues that
his claim, if successful, would shorten the length of his
current confinement because the one year period for
which he served his witness tampering sentence would
be considered pretrial confinement credit on his sexual
assault sentence, thereby effectively reducing his incar-
ceration on the sexual assault conviction by one year.
   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 juris-
diction 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 proceed-
ings, including on appeal.’’ (Internal quotation marks
omitted.) Ajadi v. Commissioner of Correction, 280
Conn. 514, 532–33, 911 A.2d 712 (2006).
  ‘‘A habeas court has subject matter jurisdiction to
hear a petition for [a writ of] habeas corpus [if] 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). Section
§ 52-466 (a) (1) provides in relevant part that ‘‘[a]n appli-
cation for a writ of habeas corpus . . . shall be made
to the superior court, or to a judge thereof, for the
judicial district in which the person whose custody
is in question is claimed to be illegally confined or
deprived of such person’s liberty.’’ (Emphasis added.)
Our Supreme Court previously has concluded that the
custody requirement of § 52-466 is jurisdictional
because ‘‘the history and purpose of the writ of habeas
corpus establish that the habeas court lacks the power
to act on a habeas petition absent the petitioner’s alleg-
edly unlawful custody.’’ Lebron v. Commissioner of
Correction, supra, 274 Conn. 526.
   An exception exists, however, to the custody require-
ment. ‘‘A habeas petitioner who is serving consecutive
sentences may challenge a future sentence even though
he is not serving that sentence at the time his petition
is filed; see Peyton v. Rowe, [391 U.S. 54, 67, 88 S. Ct.
1549, 20 L. Ed. 2d 426 (1968)]; and he may challenge a
consecutive sentence served prior to his current con-
viction if success [on his petition] could advance his
release date. Garlotte v. Fordice, [515 U.S. 39, 47, 115
S. Ct. 1948, 132 L. Ed. 2d 36 (1995)]. In other words,
the . . . courts view prior and future consecutive sen-
tences as a continuous stream of custody for purposes
of the habeas court’s subject matter jurisdiction.’’
(Emphasis in original; internal quotation marks omit-
ted.) Oliphant v. Commissioner of Correction, 274
Conn. 563, 573, 877 A.2d 761 (2005).
  In the present case, the petitioner claims that the
court improperly dismissed his petition on the basis
that he was not ‘‘in custody’’ at the time the petition
was filed. The petitioner argues that the reasoning of
Garlotte should be extended to the facts of this case
and asks us to determine whether he was effectively
in custody at the time he filed this petition.
    We conclude that the court properly dismissed the
petition because the petitioner failed to allege sufficient
facts to establish the habeas court’s subject matter juris-
diction to hear his petition for a writ of habeas corpus.
‘‘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 dis-
cretion to look beyond the pleadings . . . to decide
claims not raised.’’ (Internal quotation marks omitted.)
Lebron v. Commissioner of Correction, supra, 274
Conn 519. The party bringing the action bears the bur-
den of proving that the court has subject matter jurisdic-
tion. Fink v. Golenbock, 238 Conn. 183, 199, 680 A.2d
1243 (1996).
   Here, the record is devoid of specific facts alleged
by the petitioner that could have established the habeas
court’s subject matter jurisdiction to hear his petition.
Even if we were persuaded by the merits of the petition-
er’s argument that the reasoning of Garlotte should be
extended to the facts of this case, the facts he alleged
in his petition are insufficient to prove his claim.5 The
petitioner supports his claim on appeal with various
facts regarding his sentences, dates of confinement,
and pretrial confinement credit. Those facts have only
been alleged by the petitioner in his brief to this court,
however, and the facts were not alleged or proven
before the habeas court and are otherwise not included
in the record before us on appeal.6
   The habeas court did not conduct a hearing before
it dismissed the petition because, as can be determined
from a review of the petition, the petitioner had not
satisfied his obligation to allege sufficient facts in his
pleading, which, if proved, would establish that he was
in custody at the time he filed the petition. The court
thus lacked jurisdiction, and the habeas court ‘‘at any
time, upon its own motion,’’ could dismiss the petition.
Practice Book § 23-29. Under these circumstances,
where § 23-29 did not require a hearing before dismissal,
the habeas court did not have an obligation to grant a
hearing to the petitioner prior to dismissing the petition.
After the dismissal, and prior to his appeal, the peti-
tioner did not file any motion or other pleading in the
habeas court alleging a basis for his entitlement to a
hearing. Had he done so, the habeas court, in its discre-
tion, could have held a hearing and made factual find-
ings regarding the issue of custody and the court’s
subject matter jurisdiction. Because that did not occur,
the petitioner’s claim fails.
      The judgment is affirmed.
      In this opinion the other judges concurred.
  1
    The court granted the petitioner certification to appeal.
  2
    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 . . . .’’
  3
    See North Carolina v. Alford, 400 U.S. 25, 37, 91 S. Ct. 160, 27 L. Ed 2d
162 (1970).
  4
    See General Statutes § 18-98d (a) (1) (B).
  5
    The petitioner did not attach court records from his other cases to his
petition in this case.
  6
    We decline the petitioner’s request to take judicial notice of the facts
underlying his claims, including the other court files that he asserts establish
such facts. The petitioner had an obligation to set forth in his petition
sufficient facts that, if proven, demonstrate that the habeas court had subject
matter jurisdiction over his claim. He simply failed to do so. Moreover, our
Supreme Court has stated: ‘‘[W]hen a court takes judicial notice of a prior
case, it is not at all inclusive but is directed to specific records that must
be carefully construed in the subsequent litigation.’’ O’Connor v. Larocque,
302 Conn. 562, 568 n.6, 31 A.3d 1 (2011). We are unconvinced that it is
appropriate to exercise our discretion to take judicial notice of the facts
from other court records here because they have not undergone the careful
scrutiny that O’Connor suggests is appropriate.
