Opinion
December 29, 1993
Appeal from the Onondaga County Court, Cunningham, J.
Present — Denman, P.J., Callahan, Pine, Doerr and Boehm, JJ.
Judgment unanimously modified on the law and as modified affirmed and matter remitted to Onondaga County Court for further proceedings in accordance with the following Memorandum: We reject the People's contention that defendant waived his right to appeal his sentencing as a predicate felon without a hearing when he accepted the plea agreement. The right to challenge the legality of a sentence is not subject to waiver (see, People v Callahan, 80 N.Y.2d 273, 281; People v Francabandera, 33 N.Y.2d 429).
County Court erred in summarily refusing to consider the constitutional challenge of defendant to his prior felony conviction. When the constitutionality of a predicate felony is attacked, the sentencing court must conduct a hearing prior to imposing a second felony offender sentence (CPL 400.21; People v Longboat, 154 A.D.2d 916). We, therefore, modify the judgments by vacating defendant's sentences and remit the matters to the sentencing court for a hearing to determine the merits of the challenge to defendant's predicate felony conviction (see, CPL 400.21 [b]).