Appeal from a judgment of the County Court of Schenectady County (Giardino, J), rendered June 22, 2007, convicting defendant upon his plea of guilty of the crimes of attempted murder in the second degree (two counts), assault in the first degree (two counts) and reckless endangerment in the first degree (10 counts).
In full satisfaction of a 16-count indictment, defendant *754pleaded guilty to attempted murder in the second degree (two counts), assault in the first degree (two counts) and reckless endangerment in the first degree (10 counts) and waived his right to appeal. County Court agreed to impose a sentence not to exceed 12 years in prison. Thereafter, defendant was sentenced to an aggregate term of 10 years in prison and was ordered to pay $200 in restitution. Defendant appealed and his assigned counsel filed, an Anders brief and moved to be relieved as counsel. This Court rejected the Anders brief, withheld decision and assigned new counsel (People v Galietta, 64 AD3d 995 [2009]).
Defendant now argues that all waivers of the right to appeal “should be barred” and that his waiver as executed in County Court should not preclude him from challenging his sentence as harsh and excessive. Waiving one’s right to appeal as part of a plea agreement is not inherently coercive or against public policy (see People v Lopez, 6 NY3d 248, 255 [2006]; People v Seaberg, 74 NY2d 1, 8-10 [1989]). And, while defendant makes no particular claim addressed to the integrity or adequacy of this waiver, our review establishes that defendant was fully aware of all of the ramifications of giving up his right to appeal when he executed it (see People v Motz, 52 AD3d 1029, 1031 [2008], lv denied 11 NY3d 791 [2008]). In addition, with counsel present, defendant executed a written waiver of his right to appeal in open court and, in that document, confirmed that, after conferring with counsel, he had decided to waive his right to appeal (see People v Chaney, 70 AD3d 1251, 1252 [2010]).
While defendant, by waiving his right to appeal, cannot challenge his sentence as harsh and excessive (see People v Thomas, 71 AD3d 1231, 1233 [2010]; People v Gentry, 68 AD3d 1353, 1355 [2009], lv denied 14 NY3d 800 [2010]; People v Dixon, 62 AD3d 1214, 1215 [2009], lv denied 13 NY3d 743 [2009]), his sentence should not have contained any additional conditions not set forth in the plea agreement. In that regard, restitution was first mentioned when County Court actually pronounced defendant’s sentence and it was not part of the plea agreement (see People v Tehonica, 46 AD3d 942, 943 [2007]). While defendant did not object at that time to the court’s imposition of restitution as part of the sentence, that failure does not preclude him from raising this issue on appeal (see People v Gantt, 63 AD3d 1379, 1380 [2009]; People v McDowell, 56 AD3d 955, 956 [2008]).
If, at the time it pronounced sentence, County Court was of the view that restitution should be included in the sentence, it was required to provide defendant with an opportunity to *755withdraw his plea prior to imposing it (see People v McDermott, 68 AD3d 1453, 1454 [2009]; People v Gantt, 63 AD3d at 1380; People v Armstead, 52 AD3d 966, 967-968 [2008]; People v Pickens, 45 AD3d 1187, 1188 [2007], lv denied 10 NY3d 769 [2008]). Therefore, defendant’s sentence must be vacated and the matter remitted to County Court to impose the agreed-upon sentence or, in the alternative, to give defendant the option of withdrawing his plea before imposing the enhanced sentence (see People v McDermott, 68 AD3d at 1454; People v Armstead, 52 AD3d at 968; People v Pickens, 45 AD3d at 1188).
Mercure, J.P., Peters, Spain and Malone Jr., JJ., concur. Ordered that the judgement is modified, on the law, by vacating the sentence imposed; matter remitted to the County Court of Schenectady County for further proceedings not inconsistent with this Court’s decision; and, as so modified, affirmed.