
    The People of the State of New York, Respondent, v John A. Flores, Appellant.
    [19 NYS3d 524]
   Appeal from judgment of resentence, Supreme Court, New York County (Ronald A. Zweibel, J.), rendered June 6, 2014, resentencing defendant to a term of nine years, held in abeyance, and the matter remanded for resentencing.

On a prior appeal (116 AD3d 644 [1st Dept 2014]), this Court ordered a plenary resentencing proceeding, to include consideration of whether to grant youthful offender treatment. The court at resentencing determined that defendant was not entitled to a youthful offender adjudication, and stated that, as a result of the former determination, it was without authority to consider a reduction in sentencing. Accordingly, the court reimposed the nine-year sentence for defendant’s conviction, upon a guilty plea, of attempted assault in the first degree.

Defendant’s waiver of his right to appeal was invalid, where the court failed to adequately ensure defendant’s understanding that the right to appeal is separate and distinct from the rights automatically forfeited by pleading guilty (see People v Lopez, 6 NY3d 248, 256 [2006]). The court’s statement that defendant was “waiving [his] right to appeal any legal issues connected with the case, including the sentence” (emphasis added) was incorrect, insofar as a defendant cannot waive certain rights, such as the right to challenge the legality of a sentence or raise a speedy trial claim (People v Seaberg, 74 NY2d 1, 9 [1989]). The court’s further statement that the “right of appeal is waived by [defendant], the rights I just mentioned are automatically waived by a plea” was insufficient to explain that the right to appeal is not included with those automatically waived by a guilty plea, since the court had “just mentioned” that right. Moreover, defendant’s execution of a written waiver “does not, standing alone, provide sufficient assurance that the defendant is knowingly, intelligently and voluntarily giving up his or her right to appeal” (People v Pressley, 116 AD3d 794, 795 [2d Dept 2014], lv denied 23 NY3d 967 [2014] [internal quotation marks omitted]; see also People v Oquendo, 105 AD3d 447, 448 [1st Dept 2013], lv denied 21 NY3d 1007 [2013]).

We decline to substitute our judgment for that of the sentencing court, which determined that defendant was not an “eligible youth” for a youthful offender adjudication based on a lack of “mitigating circumstances that bear directly upon the manner in which the crime was committed” and where defendant’s participation in the crime was not “relatively minor” (CPL 720.10 [3]). Indeed, defendant carried a gun to an encounter with known gang members, displayed the gun, handed the gun to a codefendant who fired shots into the air while being pursued by the gang members, and, upon taking the gun back from the codefendant, fired a shot that struck one of the pursuers.

However, the matter should be remanded for a new sentencing proceeding because the “record indicates possible harm,” such as the court’s reservation regarding the fairness of the sentence to be imposed, emanating from the court’s erroneous belief that it lacked authority to reduce the sentence as a result of its determination that defendant was not entitled to a youthful offender finding (see People v Diaz, 304 AD2d 468, 468 [1st Dept 2003], lv denied 100 NY2d 561 [2003]; see also People v Farrar, 52 NY2d 302, 308 [1981]). At the resentencing hearing, the court stated that “since I don’t find it appropriate to grant youthful offender treatment under the circumstances!,] ... I don’t believe that this is appropriate or lawful for me to reduce the sentence.” Defense counsel stated that, as was discussed off the record, the court did have “the authority . . . to impose the sentence that it believes is appropriate in this case” instead of a sentence it considered excessive. The court responded, “All right. So I think we made the record” and reimposed the nine-year prison sentence. This exchange, referring to the off-the-record discussion had among counsel and the court, suggests that the court might have reduced defendant’s sentence had it believed that it retained the authority to do so.

The record is ambiguous as to whether the court believed that the nine-year sentence was excessive. The record contains evidence of mitigating factors upon which the court might have based a sentence reduction, such as the severe abuse defendant suffered as a child, his history of mental illness and impairment (e.g. his inability to spell simple words such as “face” and engage in simple mathematics such as “3 x 5” at pre-sentencing examination), and the progress defendant has made during his incarceration (e.g. working toward obtaining a GED and becoming a facilitator in an anti-violence program).

Therefore, “the record indicates possible harm flowing from the court’s error” {Diaz, 304 AD2d at 468), and the matter should be remanded for resentencing. Although the court did not find any mitigating circumstances bearing directly on the manner in which defendant committed the crime, it may have considered these other mitigating factors in determining whether a sentence reduction was warranted. However, we express no opinion on whether defendant is deserving of such a reduction. The court need not reconsider the youthful offender determination, but it should determine explicitly whether defendant’s sentence should be reduced upon resentencing. We hold the appeal in abeyance pending that determination. Concur — Tom, J.P., Acosta, Richter and Kapnick, JJ. 
      
      . As this Court did not previously consider whether the sentence was excessive (see 116 AD3d at 645), the court at resentencing retained its discretion to reduce the sentence and, upon declining to grant youthful offender status, should not have “treated the duty of resentencing as a ministerial function” (People v Desulma, 26 AD3d 443, 444 [2d Dept 2006]; see also Farrar, 52 NY2d at 308; People v Bibbs, 17 AD3d 170 [1st Dept 2005]).
     
      
      . “The court, however, should entertain an application by the People to withdraw consent to the plea if a sanction less severe than that negotiated is to be imposed” (Farrar, 52 NY2d at 308). This, of course, is simply the “counterpart of [a] defendant’s right to withdraw the plea in the event the court, in the exercise of its discretion, determines that the sentence agreed upon is inappropriate and indicates an intention to increase the severity of the punishment” (id. at 308 n). “Absent defendant’s showing of. . . prejudice [that would prevent the restoration to status quo ante] or other circumstances militating against vacatur, . . . relief to the People would be proper” (id. at 308).
     