Tina K. Sodhi, Alternate Public Defender, Albany (Steven M. Sharp of counsel), for appellant. P. David Soares, District Attorney, Albany (Erin N. LaValley of counsel), for respondent. Appeal from a judgment of the Supreme Court (Roger D. McDonough, J.), rendered July 15, 2022 in Albany County, convicting defendant upon his plea of guilty of the crime of murder in the second degree. In satisfaction of a four-count indictment, defendant pleaded guilty to murder in the second degree, admitting that he had intentionally killed the victim by shooting him with a gun. Pursuant to the plea agreement, which required that he waive his right to appeal, defendant was promised a prison sentence of 18 years to life. Supreme Court thereafter imposed the agreed-upon sentence, and defendant appeals. Initially, defendant correctly argues that he was unlawfully sentenced as a second felony offender, a claim that implicates the legality of his sentence and, therefore, survives any appeal waiver (see People v. Lopez, 6 NY3d 248, 255 [2006]). During the plea proceedings, after he entered a guilty plea, defendant admitted the predicate felony conviction and waived his right to a hearing.[1] As the People concede, defendant was convicted of murder in the second degree, an A-1 felony, for which predicate sentencing is specifically precluded by statute (see Penal Law §§ 70.06 [1] [a]; 125.25 [1]). At sentencing, Supreme Court mentioned that the People had handed up the special information charging the predicate offense, which defendant had admitted, but, in pronouncing sentence, the court did not state that it was imposed upon him as second felony offender. In any event, the plea offer was not conditioned on defendant admitting the predicate conviction or on second felony offender sentencing, defendant was correctly advised of the maximum permissible sentence range that could be imposed for this A-1 felony, 25 years to life (see Penal Law § 70.00 [2] [a]; [3] [a] [i]; see also Penal Law § 60.05 [2]) and he received the agreed-upon 18-year prison sentence, which was lawful. As such, the predicate admission had no effect on sentencing and no prejudice inured to defendant. However, as the uniform sentence and commitment form designates that defendant was sentenced as a second felony offender, the matter must be remitted to Supreme Court to amend it to reflect the correct status. Defendant’s challenge to the agreed-upon sentence as harsh and excessive is precluded by his valid waiver of appeal, which was recited as a condition of the plea agreement (see People v. Lopez, 6 NY3d at 255; People v. Gayle, 221 AD3d 1061, 1061- 1062 [3d Dept 2023]). Contrary to defendant’s contention,[2] the combined oral waiver and written waiver of appeal, which defendant reviewed with counsel and signed during the plea allocution, indicating that he understood and agreed to it, made clear that the waiver is not an absolute bar to taking a direct appeal and that some issues were nonwaivable for which appellate review survived, with specific examples (see People v. Wint, 222 AD3d 1050, 1051 [3d Dept 2023], lv denied 41 NY3d 945 [2024]; People v. Drake, 217 AD3d 1273, 1273 [3d Dept 2023]). The written waiver confirmed that defendant had been apprised of his appellate rights and sufficiently explained the nature of the right being waived, and both the oral colloquy and the written waiver advised defendant that the waiver of appellate rights was separate and distinct from the trial-related rights automatically forfeited by a guilty plea (see People v. Lopez, 6 NY3d at 256; People v. Wint, 222 AD3d at 1050; People v. Baker, 221 AD3d 1198, 1198 [3d Dept 2023], lv denied 40 NY3d 1091 [2024]). “Under these circumstances, we are satisfied that the counseled defendant understood the distinction that some appellate review survived and find that defendant’s combined oral and written waiver of the right to appeal was knowing, intelligent and voluntary” (People v. Baker, 221 AD3d at 1199 [internal quotation marks and citations omitted]). Garry, P.J., Aarons, Reynolds Fitzgerald, McShan and Powers, JJ., concur. ORDERED that the judgment is affirmed, and matter remitted to the Supreme Court for entry of an amended uniform sentence and commitment form.