Opinion
Maceio McNight appeals from the judgment entered after his plea of guilty. 1 Appellant contends that (1) this appeal is not subject to the requirement of a probable cause certificate pursuant to Penal Code section 1237.5; 2 (2) appellant was denied effective assistance of counsel at sentencing because his counsel failed to urge mitigating circumstances; and (3) the trial court erred in failing to consider mitigating circumstances before sentencing. We do not agree that appellant is exempt from the requirement of a certificate of probable cause, and we dismiss the appeal. As a result, we do not reach the issues concerning effective assistance of counsel and mitigating circumstances. 3
Facts
In information No. 104986, filed in the superior court on April 27, 1981, appellant was charged in counts I through V, relating to the victim S., with assault with intent to commit rape (§ 220), two counts of rape (§ 261, subd. (3)), assault with force likely to produce great bodily injury (§ 245, subd. (a)), and false imprisonment (§ 236). He was charged in counts VI through XI, relating to the victim K., with kidnaping (§ 207), robbery (§ 211), two counts of rape (§ 261, subd. (2)), oral copulation (§ 288a), and assault with a deadly weapon (§ 245, subd. (a)). The information also alleged firearm use enhancements (§ 12022.3, subds. (a), (b)) in connection with the sex offenses against victim K. and firearm use enhancements under section 12022.5 in connection with the robbery and assault of victim K.
*623 In criminal complaint No. 406908, filed in the municipal court on April 22, 1981, appellant was charged in three counts, relating to a third victim, with rape (§ 261, subd. (3)), assault with force likely to produce great bodily injury (§ 245, subd. (a)), and false imprisonment (§ 236). He pled guilty to the rape count on condition that he receive the middle-term sentence and that the other two counts be dismissed. The cause was then certified to the superior court for sentencing under No. 105595.
Pursuant to the plea agreement with the district attorney in superior court, appellant pled guilty to three counts of rape (two from information No. 104986 and one from No. 105595) and one firearm use allegation (§ 12022.3, subd. (a)). The prosecution dismissed the remaining charges and agreed to recommend the middle term for each rape charge (six years), plus a three-year enhancement for firearm use.
The court found appellant to be a mentally disordered sex offender and committed him to Atascadero State Hospital for a period not to exceed 21 years, the length of the sentence recommended by the prosecution pursuant to the plea agreement. Appellant was returned to the court as not amenable to treatment. The court vacated the commitment order and sentenced appellant to 21 years in prison, with credit for the time he was committed to the hospital. Appellant filed a notice of appeal and applied for a certificate of probable cause pursuant to section 1237.5, which the court denied on the ground that no legal basis existed for his petition.
Discussion
Appellant contends that his appeal is properly before this court despite the trial court’s denial of a certificate of probable cause pursuant to section 1237.5. That section provides, in pertinent part: “No appeal shall be taken by defendant from a judgment of conviction upon a plea of guilty . . . except where: [¶] (a) The defendant has filed with the trial court a written statement, executed under oath or penalty of perjury showing reasonable constitutional, jurisdictional, or other grounds going to the legality of the proceedings; and [¶] (b) The trial court has executed and filed a certificate of probable cause for such appeal with the county clerk.”
Two recognized exceptions to the section 1237.5 requirement are codified in California Rules of Court, rule 31(d): “. . .If the appeal from a judgment of conviction entered upon a plea of guilty ... is based solely upon grounds (1) occurring after entry of such plea which do not challenge the validity of the plea or (2) involving a search or seizure, . . . the provisions of section 1237.5 of the Penal Code requiring a statement by the defendant and a certificate of probable cause by the trial court are inapplicable, ...”
*624 Appellant contends that his challenge to the sentence imposed in this case falls within the first exception because sentencing took place after his guilty plea, and he does not challenge the validity of the plea itself.
Although rule 31(d), California Rules of Court, refers to grounds occurring
after
the entry of a guilty plea, the timing of such grounds is not a conclusive factor. In determining the applicability of section 1237.5 to a challenge of a sentence imposed after a guilty plea, “. . . the crucial issue is what the defendant is challenging, not the time or manner in which the challenge is made.”
(People
v.
Ribero
(1971)
Appellant claims that because he does not seek withdrawal of his guilty plea, but only appellate review of the sentencing procedure, section 1237.5 should not bar his appeal. His contention is without merit. “The state, in entering a plea bargain, generally contemplates a certain ultimate result; integral to its bargain is the defendant’s vulnerability to a term of punishment. . . . When a defendant gains total relief from his vulnerability to sentence, the state is substantially deprived of the benefits for which it agreed to enter the bargain. Whether the defendant formally seeks to withdraw his guilty plea or not is immaterial; it is his escape from vulnerability to sentence that fundamentally alters the character of the bargain.”
(People
v.
Collins
(1978)
The prosecutor was bound by the plea agreement, and any change in the agreement’s terms would have given appellant the right to withdraw the guilty plea.
(People
v.
Delles
(1968)
*625
People
v.
Ward
presents an enlightening contrast to the case at bench. There, the sentencing procedures were “altogether distinct” from the defendant’s guilty plea because the defendant’s plea was not predicated on either a finding of any specific degree of the crime charged or the penalty to be imposed.
(People
v.
Ward
(1967)
This case is analogous to
People
v.
Williams
(1980)
Appellant alternatively relies on
People
v.
Holland
(1978)
The appeal is dismissed.
Scott, Acting P. J., and Anderson, J., * concurred.
Appellant’s petition for review by the Supreme Cburt was denied November 14, 1985.
Notes
Respondent concedes the timeliness of this appeal. Appellant was committed to Atascadero State Hospital on August 10, 1981. While the court could have sentenced appellant on that date and suspended execution of the sentence during commitment, it did not formally sentence appellant until he was returned to court on August 15, 1983. Notice of appeal was timely filed on August 30, 1983. (See
People
v.
Munoz
(1975)
A11 further statutory references are to the Penal Code.
These same issues were raised on a petition for habeas corpus relief and found to be without merit.
It is significant that appellant’s plea agreement included a specific recommended sentence of three middle terms plus a three-year enhancement. If appellant had pled guilty on the sole condition that the other charges against him be dropped, the trial court could have selected any appropriate sentence without violating the plea agreement. In that situation, the sentencing proceedings probably would not be part of the plea itself, and section 1237.5 requirements might not apply. (See, e.g.,
People
v.
Pinon
(1979)
We note that even if the appeal were properly before us, we would reject appellant’s claim of inadequacy of counsel. The trial attorney’s failure to argue mitigating circumstances at the sentencing hearing is explained simply by the fact that the length of sentence was established by the plea agreement. Reasonably competent attorneys are not required to make frivolous arguments. (See, generally,
People
v.
Fosselman
(1983)
Assigned by the Chairperson of the Judicial Council.
