Appeal from a judgment of the County Court of Greene County (Pulver, Jr., J), rendered December 19, 2006, convicting defendant upon her plea of guilty of the crime of attempted criminal sale of a controlled substance in the third degree.
Defendant was indicted for criminal sale of a controlled substance in the third degree and criminal possession of a controlled substance in the third degree, based upon her sale of crack cocaine to an undercover police officer. Defendant subsequently pleaded guilty to attempted criminal sale of a controlled substance in the third degree in full satisfaction of the indictment, as well as in satisfaction of certain outstanding charges and an ongoing investigation concerning defendant’s unauthorized use of her mother’s credit card. Sentencing was adjourned for one year with the understanding that defendant was to complete a long-term residential drug and alcohol treatment program. After completing this program, defendant was to be sentenced to time served plus five years of probation. However, it was also understood that if defendant failed to complete the rehabilitation program, she may be sentenced to a prison term of up to 5½ years.
Three months after entering the rehabilitation program, defendant was discharged for violating program rules. Based on defendant’s failure to complete the rehabilitation program, County Court found her in violation of her plea agreement and *1188sentenced her to a term of 5½ years in prison, with two years of postrelease supervision, and ordered her to pay restitution of $848.33 based on her unauthorized use of her mother’s credit card. Defendant now appeals.
Defendant initially contends that there was insufficient evidence that she violated the plea agreement. We disagree. County Court held a hearing where evidence was presented that defendant had violated program rules, including, among other things, testing positive for opiates and having beer hidden in her luggage. Therefore, we find that County Court’s inquiry was sufficient to support the conclusion that defendant had failed to successfully complete the long-term rehabilitation program and had violated the plea agreement (see People v Valencia, 3 NY3d 714, 715 [2004]; People v Outley, 80 NY2d 702, 712 [1993]).
However, defendant’s plea agreement, which satisfied outstanding charges and ongoing investigations against her, including the investigation concerning the unauthorized use of her mother’s credit card, did not include the payment of restitution. As the plea agreement did not include restitution or the possibility that restitution might be imposed, this matter must be remitted to County Court to afford defendant the opportunity to withdraw her plea or accept the enhanced sentence. Alternatively, the court may resentence defendant as promised in the plea agreement (see People v Nugent, 31 AD3d 976, 978 [2006], lv denied 8 NY3d 925 [2007]; People v Schwickrath, 23 AD3d 707, 708-709 [2005]).
Finally, as defendant validly waived her right to appeal, she is precluded from contending that her sentence was harsh and excessive (see People v Cross, 42 AD3d 586, 587 [2007]; People v Tedesco, 38 AD3d 1102, 1103 [2007], lv denied 8 NY3d 991 [2007]).
Crew III, J.P., Spain, Carpinello and Mugglin, JJ., concur. Ordered that the judgment is modified, on the law, by vacating the sentence imposed; matter remitted to the County Court of Greene County for further proceedings not inconsistent with this Court’s decision; and, as so modified, affirmed.