Order of the Supreme Court, Bronx County (Robert L. Cohen, J.), entered April 24, 1987, vacating the conviction and sentence rendered after trial on March 29, 1985, unanimously affirmed. The People’s appeal *468from the March 29, 1985 judgment (Jack Rosenberg, J.) is dismissed as moot. The People’s appeal from the judgment rendered November 17, 1988 (Robert L. Cohen, J., at plea and sentence), convicting defendant, upon his guilty plea, of burglary in the second degree and resisting arrest and sentencing defendant to an indeterminate term of imprisonment of from 4 to 8 years and a definite term of one year, respectively, is dismissed on the ground that the conviction is nonappealable.
Defendant was convicted, after trial, of burglary in the second degree and resisting arrest. He testified on his own behalf at trial. The District Attorney’s effort to contest defendant’s credibility was facilitated because trial counsel turned over a lengthy letter that defendant had written, in confidence, to defense counsel. This single error requires vacatur of the conviction (see, People v Long, 81 AD2d 521). Counsel should not have disclosed defendant’s confidential communications. The attorney-client privilege was waived neither by defendant’s decision to testify (People v Lynch, 23 NY2d 262, 271) nor by the reciprocal discovery rules of CPL 240.30 (People v Damon, 24 NY2d 256; People v Rosario, 9 NY2d 286).
With regard to the People’s appeal from the November 1988 sentence imposed upon defendant’s guilty plea, we note that this court previously denied a writ of prohibition and dismissed the petition seeking to avoid enforcement of the agreement on the ground that the plea accepted by the court, over the objection of the People, was in respect of less than the full indictment, which comprised 10 counts (Matter of Gentile v Cohen, 144 AD2d 1039). The Court of Appeals dismissed a motion for leave to further appeal the matter, ruling that the issues presented had become moot (73 NY2d 917). While we agree that vacatur of defendant’s conviction upon his CPL 440.10 motion revived all of the counts in the indictment and that, therefore, a plea of guilty should not have been accepted to less than the entire indictment absent the District Attorney’s consent (CPL 220.10 [4] [a]), the Criminal Procedure Law does not authorize an appeal of that conviction by the People (see, CPL 450.20). Contrary to the People’s argument, the thrust of their appeal is the validity of the underlying conviction, not the legality of the sentence. Thus, CPL 450.20 (4) and 450.30 (2), upon which they rely, do not afford the appropriate remedy. Concur—Sullivan, J. P., Carro, Wallach and Rubin, JJ.