***********************************************
    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.
***********************************************
  STATE OF CONNECTICUT v. PETER E. NUSSER
                (AC 41937)
                     Lavine, Prescott and Harper, Js.

                                  Syllabus

The defendant, who had been convicted, on guilty pleas, of the crimes of
   larceny in the first degree, burglary in the third degree, and criminal
   violation of a restraining order, appealed to this court from the judgment
   of the trial court denying his second motion for presentence confinement
   credit. The court had granted the defendant’s first motion for presen-
   tence confinement credit and, thereafter, issued a revised mittimus.
   Subsequently, the defendant filed a second motion for presentence con-
   finement credit and, at the hearing on that motion, defense counsel
   informed the court that the Department of Correction had found the
   revised mittimus problematic and would not credit the defendant’s sen-
   tence. The court denied the defendant’s second motion, and this appeal
   followed. On appeal, the defendant claimed that the court abused its
   discretion in denying his second motion for presentence confinement
   credit, that his sentence was illegal because it breached his plea agree-
   ment with the state, and that the failure of the department to implement
   the revised mittimus resulted in structural error and fundamental
   unfairness in the sentencing process. Held that the trial court lacked
   subject matter jurisdiction to hear the defendant’s second motion for
   presentence confinement credit: a petition for a writ of habeas corpus,
   rather than a motion directed at the sentencing court, is the proper
   method to challenge the application of presentence confinement credit;
   the defendant never argued that there was an illegal sentence, illegal
   disposition, or that the sentence was imposed in an illegal manner, and
   he did not argue or present evidence demonstrating that his second
   motion fell within the narrow grant of jurisdiction provided by the
   applicable rule of practice (§ 43-22).
           Argued January 6—officially released April 21, 2020

                            Procedural History

  Informations charging the defendant, in the first case,
with the crimes of larceny in the first degree, burglary
in the third degree, and criminal mischief in the third
degree, and, in the second case, with seventeen counts
each of the crimes of criminal violation of a restraining
order and harassment in the second degree, brought to
the Superior Court in the judicial district of Danbury,
where the defendant was presented to the court, Hon.
Susan Reynolds, judge trial referee, on a plea of guilty
to larceny in the first degree, burglary in the third
degree, and one count of criminal violation of a restrain-
ing order, and the court rendered judgments in accor-
dance with the pleas; thereafter, the court denied the
defendant’s motion for presentence confinement credit,
and the defendant appealed to this court. Improper
form of judgment; judgment directed.
  Deborah G. Stevenson, assigned counsel, for the
appellant (defendant).
  Melissa L. Streeto, senior assistant state’s attorney,
with whom, on the brief, were Stephen J. Sedensky,
state’s attorney, and Warren Murray, supervisory assis-
tant state’s attorney, for the appellee (state).
                         Opinion

   HARPER, J. The defendant, Peter E. Nusser, appeals
following the trial court’s denial of his second motion
for presentence confinement credit. On appeal, the
defendant claims that (1) the court abused its discretion
in denying his second motion for presentence confine-
ment credit, (2) the sentence he received, following
the denial of his second motion, was illegal because it
breached his plea agreement with the state, and (3) the
failure of the Department of Correction (department)
to implement the court’s revised mittimus resulted in
structural error and fundamental unfairness in the sen-
tencing process. Because we conclude that the court
lacked subject matter jurisdiction to hear the defen-
dant’s second motion, we remand the case to the trial
court with direction to dismiss the motion.
   The following facts and procedural history are rele-
vant to our disposition of this appeal. On or about
August 20, 2016, the defendant was arrested and
charged with larceny in the first degree, burglary in the
third degree, and criminal mischief in the third degree.1
In conjunction with those charges, the court also issued
a restraining order precluding the defendant from con-
tacting the victim of those crimes. Because the defen-
dant was unable to post bond, he remained incarcerated
pending the resolution of the charges. During the month
of September, 2016, the defendant violated the
restraining order by telephoning the victim approxi-
mately sixteen times and by writing her a letter. The
defendant was arrested for violating the restraining
order on or about January 18, 2017, while he was still
incarcerated pending the resolution of the initial
charges.
   On April 5, 2017, the defendant pleaded guilty to
larceny in the first degree, burglary in the third degree
and one count of violation of the restraining order,
pursuant to a plea agreement. On that same day, in
accordance with that agreement, the defendant was
sentenced to 2 years and 1 day of incarceration, fol-
lowed by 2 years and 364 days of special parole, with
all sentences to run concurrently.
   On August 15, 2017, the defendant filed a motion2 with
the court claiming that he was entitled to presentence
confinement credit that should be applied to his sen-
tence, which he was serving at the time the motion was
filed. The defendant’s motion was heard on October 18,
2017. During that hearing, the defendant asked the court
to order the presentence confinement credit to run from
September 2, 2016, the date on which he first violated
the restraining order, rather than January 18, 2017,
when he was arrested for that offense. After hearing
little to no argument from either side, the court, Hon.
Susan Reynolds, judge trial referee, agreed that the
defendant, who was incarcerated at the time of the
restraining order violation, should not ‘‘pay the price
for the delay in the service of the warrant’’ for the
restraining order. The court granted the defendant’s
request and issued a new mittimus ordering that the
defendant ‘‘gets credit to [September 2, 2016], absent
any adverse action, per [department] rules.’’
    Approximately six months later, the defendant filed
a second motion for presentence confinement credit.
On May 23, 2018, during the hearing on that motion,
defense counsel informed the court that the department
found the language in the October 18, 2017 revised
mittimus to be problematic and, as a result, would not
credit the defendant’s sentence back to September 2,
2016. Specifically, according to defense counsel, the
language ‘‘absent any adverse action, per [department]
rules’’ was problematic because ‘‘[i]n [the department’s]
book that was enough to stop [it] from giving [the defen-
dant] credit.’’ Defense counsel further asserted that,
‘‘[i]f that phrase wasn’t in [the mittimus], [the depart-
ment would] . . . still be able to . . . give him the
credit he’s asking for.’’ Hearing no argument against
the motion from the state, the court said it would con-
tact the department to better understand the problem.
Later that day, the court denied the motion. This
appeal followed.
   ‘‘Subject matter jurisdiction [implicates] the authority
of the court to adjudicate the type of controversy pre-
sented by the action before it. . . . [A] court lacks dis-
cretion to consider the merits of a case over which it
is without jurisdiction . . . . If it becomes apparent to
the court that such jurisdiction is lacking, the [the mat-
ter before it] must be dismissed. . . . A determination
regarding a trial court’s subject matter jurisdiction is a
question of law . . . [over which] our review is ple-
nary . . . .
   ‘‘Our Supreme Court has held that the jurisdiction
of the sentencing court terminates once a defendant’s
sentence has begun, and, therefore, that court may no
longer take any action affecting a defendant’s sentence
unless it expressly has been authorized to act. . . .
Practice Book § 43-22 is a narrow exception to this
general rule. It provides that [t]he judicial authority may
at any time correct an illegal sentence or other illegal
disposition, or it may correct a sentence imposed in an
illegal manner or any other disposition made in an illegal
manner. . . .
   ‘‘Connecticut has recognized two types of circum-
stances in which the [sentencing] court has jurisdiction
to review a claimed illegal sentence. The first of those
is when the sentence itself is illegal, namely, when the
sentence either exceeds the relevant statutory maxi-
mum limits, violates a defendant’s right against double
jeopardy, is ambiguous, or is internally contradictory.
. . . The other circumstance in which a claimed illegal
sentence may be reviewed is that in which the sentence
is within the relevant statutory limits . . . but [is]
imposed in a way which violates [the] defendant’s right
. . . to be addressed personally at sentencing and to
speak in mitigation of punishment . . . or his right to
be sentenced by a judge relying on accurate information
or considerations solely in the record, or his right that
the government keep its plea agreement promises
. . . .’’ (Citations omitted; internal quotation marks
omitted.) State v. Montanez, 149 Conn. App. 32, 38–39,
88 A.3d 575, cert. denied, 311 Conn. 955, 97 A.3d 985
(2014).
   In the absence of either of the foregoing circum-
stances, this court previously has determined that ‘‘a
petition for a writ of habeas corpus, rather than a
motion directed at the sentencing court, is the proper
method to challenge the Commissioner of Correction’s
application of presentence confinement credit.’’ State
v. Riddick, 194 Conn. App. 243, 244–45, 220 A.3d 908
(2019); see State v. Montanez, supra, 149 Conn. App.
41 (holding that court properly dismissed for lack of
subject matter jurisdiction motion to revise judgment
mittimus raising claim of misapplication of presentence
confinement credit); State v. Carmona, 104 Conn. App.
828, 832–33, 936 A.2d 243 (2007) (habeas proceeding,
rather than motion to correct illegal sentence, was
proper method to assert claim concerning presentence
confinement credit where ‘‘the defendant attacks not
the legality of the sentence imposed by the court during
the sentencing proceeding but, rather, the legality of
his sentence as subsequently calculated by the depart-
ment’’), cert. denied, 286 Conn. 919, 946 A.2d 1249
(2008).
   In the present case, the defendant submitted two
motions to the court requesting presentence confine-
ment credit. Both motions were submitted several
months after the defendant had been sentenced pursu-
ant to his plea agreement and after he had begun serving
his agreed upon sentence. Despite having granted the
first motion, the court subsequently denied the second
motion without explanation. It is the court’s action on
the second motion that is the subject of the present
appeal.3
   In his representations to the trial court, the defendant
never argued that there was an illegal sentence, illegal
disposition, or that the sentence was imposed in an
illegal manner. See State v. Montanez, supra, 149 Conn.
App. 38. To the contrary, the defendant simply asserted
the fact that (1) there was an issue with the language
of the mittimus, (2) he was already incarcerated—
because he could not post bond for the charges of
larceny, burglary, and criminal mischief—when he vio-
lated the restraining order, and (3) he was not arrested
for that violation until four months after the violation
occurred.4
  The defendant never argued or presented evidence
demonstrating that his motion fell within the narrow
grant of jurisdiction provided for in Practice Book § 43-
22. Therefore, his second motion for presentence con-
finement credit should have been pursued through a
petition for a writ of habeas corpus rather than a motion
directed at the sentencing court. Put another way, the
defendant’s claims were pursued in the wrong forum.
State v. Montanez, supra, 149 Conn. App. 41. Accord-
ingly, we conclude that the court lacked subject matter
jurisdiction over the defendant’s motion.5
  The form of the judgment is improper, the judgment
denying the defendant’s second motion for presentence
confinement credit is reversed and the case is remanded
with direction to render judgment dismissing the defen-
dant’s motion.
      In this opinion the other judges concurred.
  1
     The facts and circumstances involving these arrests and subsequent
charges are not relevant to this appeal.
   2
     Although the defendant labeled his pleading a petition, we treat it as a
motion for presentence confinement credit.
   3
     The fact that the court may have improperly exercised jurisdiction over
the first motion has no bearing on whether it had jurisdiction over the second.
   4
     Moreover, the defendant’s second written motion included only the fol-
lowing, brief, request: ‘‘Last October the defendant requested an order
addressed to [the department] to give him credit concurrently for both of
these charges. The [c]ourt . . . granted that request on October 18 . . . .
[The department] has since told counsel it cannot follow this order because
it contains the words, ‘absent any adverse actions per [department] rules.’
The defendant therefore requests new mitts with those words deleted.’’ Of
note, even the defendant’s first motion provided only the following: ‘‘The
defendant, Peter Nusser, through his attorney, requests that this [h]onorable
[c]ourt give him jail credit. Information to support this petition will be
provided at the time this motion is heard.’’ Neither of his written motions
included argument or any legal analysis relating to the exceptions provided
in Practice Book § 43-22.
   5
     Additionally, to the extent that the defendant’s brief can be read to be
raising a claim that his plea agreement was breached, his counsel clarified
at oral argument before this court that he was not challenging his sentence
on that basis but, rather, that the sentence was illegal because it violated
the agreement for credit. In accordance with our own jurisprudence, ‘‘[i]t
is not appropriate to review an unpreserved claim of an illegal sentence for
the first time on appeal. . . . Underlying this reasoning is our recognition
that, pursuant to Practice Book § 43-22, the trial court may correct an illegal
sentence at any time. . . . Consequently, the defendant has the right to file
a motion to correct an illegal sentence with the trial court at any time.’’
(Citations omitted; internal quotation marks omitted.) State v. Crump, 145
Conn. App. 749, 766, 75 A.3d 758, cert. denied, 310 Conn. 947, 80 A.3d 906
(2013). Because he never raised his claim before the trial court that his
sentence was illegal, it would be inappropriate for this court to review this
claim raised for the first time on appeal.
