
    The People of the State of New York, Respondent, v Marvin DeJesus, Appellant.
    [40 NYS3d 831]—
   Appeal from a judgment of the Oneida County Court (Michael L. Dwyer, J.), rendered March 3, 2014. The judgment convicted defendant, upon his plea of guilty, of attempted robbery in the first degree.

It is hereby ordered that the judgment so appealed from is unanimously reversed on the law, the plea is vacated and the matter is remitted to Oneida County Court for further proceedings on the indictment.

Memorandum: On appeal from a judgment convicting him, upon his plea of guilty, of attempted robbery in the first degree (Penal Law §§ 110.00, 160.15 [4]), defendant contends that County Court erred in accepting his plea of guilty without further inquiry into whether defendant was aware of and was waiving any affirmative defense that the gun displayed by bis codefendant was unloaded. We conclude that defendant’s contention, which goes to whether the plea of guilty was voluntarily, knowingly, and intelligently entered, survives his purported waiver of the right to appeal (see People v Bizardi, 130 AD3d 1492, 1492 [2015], lv denied 27 NY3d 992 [2016]). Further, although defendant failed to move to withdraw his plea or to vacate the judgment of conviction and thus failed to preserve his contention for our review (see People v Lopez, 71 NY2d 662, 665 [1988]), we conclude that this case falls within the rare exception to the preservation requirement (see id. at 666; People v Dukes, 120 AD3d 1597, 1597-1598 [2014]). The codefendant’s allocution, which in this case was intertwined with that of defendant, raised a potentially viable affirmative defense to the charge, giving rise to a duty on the part of the court, before accepting the guilty plea, to ensure that defendant was aware of that defense and was knowingly and voluntarily waiving it (see People v Powell, 278 AD2d 848, 848-849 [2000]; see generally People v Mox, 20 NY3d 936, 938-939 [2012]). Consequently, we conclude that the court erred in accepting the plea without ensuring that defendant was making an informed decision to waive the potential affirmative defense to the charge. We therefore reverse the judgment of conviction, vacate the plea, and remit the matter to County Court for further proceedings on the indictment (see Dukes, 120 AD3d at 1597-1598).

Present—Peradotto, J.P., Lindley, NeMoyer and Scudder, JJ.  