Rural Law Center of New York, Inc., Plattsburgh (Lora J. Tryon of counsel), for appellant. Gary M. Pasqua, District Attorney, Canton (Matthew L. Peabody of counsel), for respondent. Appeal from a judgment of the County Court of St. Lawrence County (Robert Main Jr., J.), rendered December 10, 2020, convicting defendant upon his plea of guilty of the crime of criminal possession of a controlled substance in the third degree (two counts). Defendant waived indictment and pleaded guilty to two counts of criminal possession of a controlled substance in the third degree as charged in a superior court information, stemming from his possession of heroin and cocaine. The plea agreement outlined by County Court (Richards, J.) contemplated that defendant would apply to a judicial diversion program and, if he were accepted and successfully completed the program, he would receive a probationary sentence and, if denied entry to the program, he would receive a seven-year prison sentence followed by three years of postrelease supervision (hereinafter PRS); if he failed, he was advised that he could receive a prison sentence up to the maximum of 12 years on each count, followed by three years of PRS. The plea agreement also required defendant to waive his right to appeal, and he executed a written appeal waiver. Defendant was accepted into and entered the program but, weeks prior to his completion of the program, he was charged with violating the conditions of his release by failing to appear for a drug test, his graduation was deferred and, weeks later, he was again charged with failing to appear for a drug test; he subsequently tested positive for cocaine. At sentencing, defendant waived a hearing and was terminated from the judicial diversion program. County Court (Main Jr., J.) sentenced him, as an acknowledged second felony drug offender, to two concurrent prison terms of seven years to be followed by three years of PRS. Defendant appeals. We affirm. Contrary to defendant’s claim, he validly waived his right to appeal. County Court (Richards, J.) advised defendant that there were certain appellate rights that he could not waive, providing specific examples of nonwaivable legal claims, and made clear that the waiver of appeal was separate and distinct from the trial-related rights that are automatically forfeited by a guilty plea (see People v. Lopez, 6 NY3d 248, 256 [2006]; People v. Hurd, 217 AD3d 1268, 1268 [3d Dept 2023]). In addition, defendant then reviewed and executed the written waiver of appeal in open court, which also made clear that certain appellate issues survive the waiver, delineating specific claims that survive, and defendant in turn assured the court that he had read and understood the waiver, had an adequate opportunity to discuss it with defense counsel and had no questions. “To the extent that the written waiver contained overbroad language, both the written waiver and County Court’s oral colloquy made clear — and we are satisfied that defendant understood — that some appellate review survived” (People v. Perry, 213 AD3d 1000, 1002 [3d Dept 2023] [internal quotation marks, brackets and citations omitted], lv denied 39 NY3d 1143 [2023]; see People v. Wint, 222 AD3d 1050, 1050-1051 [3d Dept 2023], lv denied 41 NY3d 945 [2024]; compare People v. Shanks, 37 NY3d 244, 253 [2021]). Accordingly, we find that defendant’s waiver of appeal was knowing, voluntary and intelligent (see People v. Thomas, 34 NY3d 545, 558-563 [2019]; People v. Lopez, 6 NY3d at 256; People v. Perry, 213 AD3d at 1000; People v. Ashley, 211 AD3d 1174, 1174 [3d Dept 2022]; People v. Cook, 208 AD3d 1508, 1509 [3d Dept 2022]). Given the valid appeal waiver, defendant’s challenge to the perceived severity of the sentence imposed is precluded (see People v. Lopez, 6 NY3d at 255-256; People v. Hurd, 217 AD3d at 1269). Garry, P.J., Egan Jr., Pritzker, Powers and Mackey, JJ., concur. ORDERED that the judgment is affirmed.