Opinion
John Ford Bonwit pleaded guilty to a single count of selling cocaine. (Health & Saf. Code, § 11352.) He obtained a certificate of probable cause to appeal the trial court’s denial of his pretrial Hitch motion1 seeking dismissal for a claimed destruction of material evidence. The trial court agreed evidence had been destroyed, but refused to dismiss the information and instead imposed a lesser sanction—suppression. Although he thereafter pleaded guilty, Bonwit purports to appeal the refusal to dismiss. Ironically, we would find the sanction imposed was appropriate, but are compelled to conclude the issue is not appealable following a guilty plea. In this case, however, the plea was improperly induced by the trial court’s promise to issue a certificate of probable cause. Accordingly, Bonwit’s request for an opportunity to withdraw his plea is granted.
I
A professional informant, Richard Wilder, arranged an eight-ounce purchase of cocaine from Bonwit. Bonwit and Steven Blaylock were arrested when they arrived to consummate the deal with undercover police officers. At the preliminary hearing, Wilder testified he initiated and recorded a number of telephone calls to Bonwit in setting up the buy. The defense made a formal motion for discovery of those tapes. In response, Wilder recanted his earlier testimony and denied recording any of his phone calls to Bonwit.
Bonwit sought dismissal pursuant to People v. Hitch, supra, 12 Cal.3d 641, arguing tapes had been made and intentionally destroyed, depriving him of the opportunity to prove Wilder had entrapped him into making the sale. At the hearing on that motion, Wilder testified he had not recorded any of the calls to Bonwit. He was effectively impeached by his roommate, who was present when Wilder recorded his conversations with Bonwit, and in fact listened to at least some of the tape recordings. The court determined the tapes had existed and had been destroyed. Nevertheless, the court found dismissal an inappropriate remedy and imposed a lesser sanction, the exclusion of Wilder’s testimony from the trial.
Bonwit unsuccessfully sought pretrial writ relief from this court. Despite his claim dismissal was the only appropriate remedy for the intentional *831destruction of material evidence, Bonwit entered a plea of guilty. He did condition his plea on an understanding the court would issue a certificate of probable cause (Pen. Code, § 1237.5) so he could pursue the issue on appeal.
II
A certificate of probable cause does not necessarily make an otherwise nonappealable order, appealable. (People v. Kaanehe (1977) 19 Cal.3d 1, 9 [136 Cal.Rptr. 409, 559 P.2d 1028]; People v. DeVaughn (1977) 18 Cal.3d 889, 896 [135 Cal.Rptr. 786, 558 P.2d 872].) “Other than search and seizure issues which are specifically made reviewable by [Penal Code] section 1538.5, subdivision (m), all errors arising prior to entry of a guilty plea are waived, except those which question the jurisdiction or legality of the proceedings resulting in the plea. [Citation.] . . . Obtaining a certificate of probable cause does not make cognizable those issues which have been waived by a plea of guilty. [Citation.] . . . [Penal Code] section 1237.5 does not affect the grounds upon which appeal may be taken following a guilty plea; it merely establishes a procedure for screening out frivolous claims among these issues which have not been waived. [Citations.]” (People v. Kaanehe, supra, 19 Cal.3d at p. 9.)
Three cases discuss the appealability of a Hitch motion following a guilty plea. People v. Galan (1985) 163 Cal.App.3d 786 [209 Cal.Rptr. 837] and People v. Ahern (1984) 157 Cal.App.3d 27 [204 Cal.Rptr. 11] both held a guilty plea waives any appellate review of the Hitch issue. People v. Aguilar (1985) 165 Cal.App.3d 221 [211 Cal.Rptr. 333], reached the opposite result. While we agree with Galan and Ahern, none of these three cases give a complete answer to the question posed here.
Both Galan and Aguilar involve Hitch issues relating to evidence on a search and seizure question. Galan oversimplifies the issue. Galan notes only search and seizure issues are cognizable on appeal following guilty pleas, leading to the conclusion Hitch motions are not preserved because they involve due process claims. Ahern called his Hitch motion a motion to suppress evidence and sought to appeal without first obtaining a certificate of probable cause. The court held the issue was not cognizable on appeal. Aguilar reached a different result on a similar issue and concluded a Hitch violation could be raised as an appealable search and seizure question under Penal Code section 1538.5, subdivision (m). Bonwit’s Hitch motion is distinct because it is independent of any search and seizure claim.
Bonwit contends the Hitch motion should be appealable because a plea of guilty is not inconsistent with entrapment, therefore his plea did not *832waive the issue he seeks to contest. An entrapment defense presumes guilt, but excuses the perpetrator’s conduct as a matter of public policy, concluding overzealous law enforcement conduct which induces the commission of a crime is a greater societal wrong. (See Patty v. Board of Medical Examiners (1973) 9 Cal.3d 356, 363-364 [107 Cal.Rptr. 473, 508 P.2d 1121, 61 A.L.R.3d 342].) Simply stated, how is the guilty plea a waiver of the issue if a guilty plea is not inconsistent with the defense?
A guilty plea is more than an admission of guilt; it is also a waiver of affirmative defenses. Notwithstanding the destruction of evidence material to Bonwit’s entrapment defense, his “guilty plea operated to remove such issues from consideration as a plea of guilty admits all matters essential to the conviction. [Citation.]” (People v. DeVaughn, supra, 18 Cal.3d at p. 895.) That he was not entrapped was “essential to the conviction.” The guilty plea implied an admission he was not entrapped. Thus, any claim he was unable to prove entrapment because of the destruction of evidence was waived by the plea.
Our conclusion Bonwit waived the entrapment issue a fortiori means he waived the Hitch issue. This conclusion is consistent with the principle that a guilty plea does not waive errors based on “constitutional, jurisdictional, or other grounds going to the legality of the proceedings; ...” (Pen. Code, § 1237.5, subd. (a); People v. DeVaughn, supra, 18 Cal.3d at p. 896.) A Hitch motion seeking sanctions for the destruction of evidence relating to an affirmative defense does not fit any of these exceptions.
A Hitch motion is a hybrid creature: a discovery motion and a motion for sanctions if discovery cannot be provided. (See People v. Municipal Court (Ahnemann) (1974) 12 Cal.3d 658, 660-661 [117 Cal.Rptr. 20, 527 P.2d 372].) Where material evidence has been destroyed, the court must determine what sanction best preserves the defendant’s right to a fair trial as guaranteed by constitutional due process. In that sense, Bonwit could argue the issue survives his guilty plea because it involves a constitutional question. Here, however, the constitutional question does not go to the legality of the proceedings. The precise constitutional question is whether he can receive a fair trial in spite of the entrapment evidence having been destroyed. That question is secondary to the legality of the proceedings because it only affects an affirmative defense, an issue which is once removed from the elements of the offense. In other words, it does not affect the trial court’s inherent power to proceed. It is not “a constitutional, jurisdictional, or other [question] going to the legality of the proceedings.” (Pen. Code, § 1237.5, subd. (a).)
Whether a Hitch motion presents a constitutional question puts the cart before the horse when presented to an appellate court before trial. We can*833not in fact determine whether there has been a constitutional violation which requires dismissal because there has been no trial to review in answering the question Bonwit poses: Can he have a fair trial without the missing tapes? We refuse to speculate on the fairness of his trial were it conducted in accordance with the sanction imposed, exclusion of Wilder’s testimony. However, we do note Bonwit has not been precluded from presenting an entrapment defense since at least he and his roommate can testify about the telephone conversations. The prosecution will be effectively prevented from rebutting that evidence because of the trial court’s sanction excluding Wilder’s testimony.
Under the particular facts of this case we conclude Bonwit’s request for dismissal based on a Hitch violation does not survive a guilty plea. That plea waived the entrapment defense, rendering moot his complaint about the missing tapes. Thus, it is not an appealable issue in this procedural context.
Ill
Bonwit anticipates our finding the Hitch motion is not appealable and expressly requests an opportunity to withdraw his plea. We conclude his request is well taken. Although the written Tahl2 waiver form does not recite that the plea is conditioned on his right to appeal the Hitch issue, the transcript of the hearing on the plea does. The court expressly stated one of the promises or representations made to Bonwit inducing his guilty plea was the court’s own promise to issue a certificate of probable cause “[i]n order to protect the defendant’s rights on appeal.” The promise was illusory and therefore was an improper inducement which voids the plea. (See, e.g., People v. DeVaughn, supra, 18 Cal.3d at p. 896.) We recognize Bonwit should be given an opportunity to reevaluate his guilty plea and withdraw that plea and proceed to trial if he so desires. (See People v. Hill (1974) 12 Cal.3d 731, 769 [117 Cal.Rptr. 393, 528 P.2d 1], overruled on other grounds in People v. DeVaughn, supra, 18 Cal.3d at p. 896, fn. 5.)
The judgment is reversed and the cause remanded to the trial court. If Bonwit moves to withdraw his guilty plea within 30 days of the finality of our decision, the superior court is directed to vacate the guilty plea and reinstate the information for further proceedings. Should Bonwit not move to withdraw his plea within the 30 day period, the superior court is directed *834to reinstate the judgment. (See People v. Rios (1976) 16 Cal.3d 351, 359 [128 Cal.Rptr. 5, 546 P.2d 293].)
Trotter, P. J., and Crosby, J., concurred.