Appeal from a judgment of the County Court of Rensselaer County (McGrath, J), rendered June 30, 2005, convicting defendant upon his plea of guilty of the crimes of murder in the second degree and arson in the second degree.
Carpinello, J.
Having stabbed his aunt to death and set her house on fire, defendant pleaded guilty to murder in the second degree and arson in the second degree. County Court thereafter sentenced him pursuant to a negotiated plea agreement to an aggregate prison term of 25 years to life. Defendant now appeals.
We affirm. Defendant’s challenge to the validity of his waiver of the right to appeal has been rendered unpreserved for our review by his failure to move to withdraw his plea or vacate the judgment of conviction (see People v Sawyer, 41 AD3d 1089, 1090 [2007]). In any event we find that the waiver was valid. Thus, given that the appeal waiver remains undisturbed, defendant is foreclosed from asserting that the agreed-upon sentence is harsh and excessive (see People v Tedesco, 38 AD3d 1102, 1103 [2007], lv denied 8 NY3d 991 [2007]). As a final matter, under the facts and circumstances presented herein, we cannot *882conclude that County Court abused its discretion in not sua sponte ordering defendant to undergo a competency evaluation (see People v Trotter, 28 AD3d 947, 948 [2006], lv denied 7 NY3d 764 [2006]).
Mercure, J.P., Spain, Mugglin and Kane, JJ., concur. Ordered that the judgment is affirmed.