
70 Cal.Rptr.3d 443 (2008)
158 Cal.App.4th 818
The PEOPLE, Plaintiff and Respondent,
v.
Rodney Lyn OGLESBY, Defendant and Appellant.
No. G037796.
Court of Appeal of California, Fourth District, Division Three.
January 7, 2008.
*444 Phillip I. Bronson, under appointment by the Court of Appeal, Encino, for Defendant and Appellant.
Edmund G. Brown, Jr., Attorney General, Dane R. Gillette, Chief Assistant Attorney General, Gary W. Schons, Assistant Attorney General, Peter Quon, Jr., and Maxine Cutler, Deputy Attorneys General, for Plaintiff and Respondent.

OPINION
O'LEARY, J.
Rodney Lyn Oglesby pled guilty to (1) committing domestic violence with corporal injury, resulting in a traumatic condition, (2) aggravated assault, and (3) committing animal cruelty by killing a kitten. He also admitted he inflicted great bodily injury on the victim and he had served three prison terms for which he had not *445 remained free of prison custody for a period of five years.
Pursuant to a plea bargain, the trial court sentenced Oglesby to a total prison term of six years. Approximately two weeks later, Oglesby filed a notice of appeal, but the trial court denied his request for a certificate of probable cause. Oglesby then filed an amended notice of appeal claiming to challenge the validity of the sentencing procedure. Specifically, he as serfs the trial court failed to sua sponte hold a second mental competency hearing before sentencing. The Attorney Genera) argues Oglesby's failure to obtain a certificate of probable cause bars consideration of this issue on appeal. We conclude both parties are wrong, and the judgment must be affirmed.

I
Oglesby and Karen Corbin had been living together for five months before he attacked her. It all began in early October, when Corbin brought home a kitten injured after being hit by a car. Toe kitten walked with a limp and "once in a while" would hiss at Oglesby. Approximately one week later, Oglesby told Corbin on the telephone he had shaken and killed the cat. Later that day, he told her the dead kitten and its belongings were in a dumpster.
The next morning, October 20, 200(i, Corbin recalled Oglesby was angry and "tore up the room." Together they left the motel room where they were staying and Corbin tried several times to leave Oglesby because she was frightened of him. However, he was able to restrain her by holding her hand, and he waited for her outside the restroom so that she could not slip away.
When they returned to the motel, Corbin pleaded with the manager to call the police or let her come inside the office. He refused, and Corbin tried to resist returning to the room by sitting on the ground. Oglesby proceeded to kick and punch her shoulders, head, and face. He tried to drag her across the parking lot by grabbing her hair.
The Anaheim Police Department received two 911 emergency calls at 11:30 a.m. One caller stated a woman was being beaten up by her husband in the motel parking lot, and "[s]he's already got a bloody face." The caller identified the "husband" as being in his 40's, with long blond hair, wearing a black shirt and a baseball cap, and named "Rodney." The second caller also reported a man beating "the shit outta his wife" at the motel, "right in front of the office."
Oglesby stopped beating Corbin when a resident of the motel intervened. She was bleeding from her nose, mouth, and face. Oglesby had pulled out a lot of her hair when he tried to drag her away. During an initial examination at the West Anaheim Medical Center, Corbin reported she had no feeling in her left cheek and had a continuously bloody nose. At the preliminary hearing. Corbin testified she was still experiencing these problems.
Fn the beginning of the criminal proceedings, Oglesby had a succession of differed defers-c counsel appointed to represent him. Initially, he was represented by Public Defender Matthew Darling for his arraignment and preliminary hearing. Public Defender Mark Brown represented him at the next hearing where he pled not guilty to all the counts. At a few pretrial hearings, Oglesby was represented by Public Defender Scott Belasco. But, after a few weeks, the public defender declared a conflict and in December 2005, the court appointed Alternate Public Defender, Randy Ladisky.
*446 Upon Ladisky's request, the court appointed a psychiatrist, Ted Greenzang, to examine Oglesby's mental competency to stand trial. At the request of the People, the court also appointed psychiatrist Kaushal Sharma to examine Oglesby. The court directed the doctors to determine from their examination: "(1) The nature of [Oglesby's] mental disorder, if any[;] [¶] (2) [Oglesby's] ability or inability to understand the nature of the criminal proceedings or assist counsel with a defense[;] [¶] (3) Whether treatment with antipsychotic medication is medically appropriate] [H] (4) Whether such medication is likely to restore [Oglesby] to mental competence[;] [¶] (5) Whether [Oglesby] has the capacity to make decisions regarding antipsychotic medication[;] [¶] (6) Whether [Oglesby] is a danger to self or others[;] [¶] (7) The likely or potential side effects of the medication[;] [¶] (8) Its expected efficacy[;] and [¶] (9) Possible alternative treatments[.]"
A few months later, the court considered Sharma's and Greenzang's reports. The minute order reflects the People and the defense waived their right to a hearing, waived the presence of the two doctors, and submitted the issue of mental competency on the report of Sharma only. The court concluded Oglesby was not mentally incompetent under Penal Code section 1368, and it ordered criminal proceedings reinstated.
Before trial, Oglesby filed a motion to relieve his appointed counsel pursuant to People v. Marsden (1970) 2 Cal.3d 118, 84 Cal.Rptr. 156, 465 P.2d 44 (Marsden). On October 6, 2006, the court held a Marsden hearing and denied the motion.
Over the next few weeks, the court made several evidentiary rulings. First, it determined the 911 calls were admissible. Next, it granted the People's motion to introduce Corbin's preliminary hearing testimony because she could not be located for trial. Oglesby then renewed his request for a new attorney. The court denied his request after holding another Marsden hearing.
Ladisky then informed the court that Oglesby had decided to plead guilty because "he feels helpless that his lawyer is not adequately representing him, not because he thinks he's guilty or for any other reason. And that, I think, is a travesty of justice that I cannot endorse." The court asked Oglesby directly, "How do you want to proceed today? It's completely up to you. If you want to move on with your trial, we can do that. If you want to take the court's offer, you can do that.... You could take the [People's] offer." Oglesby replied, "If I continue with the trial, can I have another lawyer?" The court advised Oglesby this was not possible, and Oglesby said he wanted to be sentenced. When the court asked him why he wanted to plead guilty, Oglesby responded, "Because I feel like it's a conflict of interest between me and my attorney. I feel like I cannot trust my attorney. I feel like if I continue in this case with my attorney, that there may be some more surprises come up [sic] and I just ... don't think I can bear with that any longer, sir."
The court told Oglesby his maximum exposure was 12 years and 8 months in prison. It informed Oglesby that in exchange for his guilty plea the court would offer him five years with two strikes and the People had offered six years with one strike. He also discussed the impact of having prior convictions as "strikes."
Oglesby accepted the People's offer and filled out a change of plea form. Ladisky would not join in the plea or the waivers and he drew lines through the preprinted paragraphs that would have indicated he had discussed the rights, charges and consequences of the plea on the form to his client. The court, prior to accepting *447 Oglesby's plea, advised him as to his rights.
At the end of the hearing, Ladisky asked if he could make a few statements on the record. He stated, "I do not join in the pleas, waivers, or the admonitions on the priors. I don't join in anything with respect to this plea. [¶] I do feel that ... Oglesby is pleading guilty not, in fact, because he is guilty, but because he is unsatisfied and feels helpless with his lawyer."
Ladisky then added, "The defense counsel had ... Oglesby seen by a number of psychiatrists and a psychologist. [He] has a significant and severe organic impairment in his brain that affects memory, reasoning, logic, problem solving, emotional control, processing information, reasoning, confusion, and inability to adequately process the interpretation of information. [¶] I don't believe that [he] understands the nature of what he is doing. I don't believe that what he's doing is in his best interests. I don't believe he understands the consequences of his plea. As many times as I have tried to explain to him the consequences of having the strike, I am not satisfied that he understands any of that. And for those reasons, I am not joining in the [pleas] or the waivers or the admission."
In an effort to clarify the record, Ladisky noted that of the two court appointed psychiatrists, one found Oglesby competent and one did not. He explained, "we had made a tactical decision at the time to submit on the report that found him competent, because we felt that .. . Oglesby needed to proceed back to trial." The court replied, "The record should also reflect that we spent the last two days going over legal 402 issues. Not once was there any reference to any mental health issue or [a section] 1368 issue. Bringing that up now doesn't cause the court any concern, because that's what was in the history of the case. But to now suggest that he's 1368 and he can't join in on the plea, I took valid waivers. The court does believe that the defendant understood the rights that the court gave him, and that he was willing to waive those] rights and accept the sentence."

II
The People assert Oglesby's failure to obtain a certificate of probable cause bars this issue on appeal. They assert any challenge to a stipulated sentence implicates the validity of the plea and requires a certificate. Oglesby contends he is not challenging the sentence, but, rather the sentencing procedure. He argues the court should have suspended sentencing to inquire into his competence, but did not. We conclude, this is a distinction that makes a difference. No certificate was required.
"Section 1237.5 states: No appeal shall be taken by the defendant from a judgment of conviction upon a plea of guilty or nolo contendere . . except where both of the following are met: [¶] (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. [¶] (b) The trial court has executed and filed a certificate of probable cause for such appeal with the clerk of the court."
"`Notwithstanding the broad language of section 1237.5, it is settled that two types of issues may be raised in a guilty or nolo contendere plea appeal without issuance of a certificate: (1) search and seizure issues for which, an appeal is provided under section 1538.5, subdivision (m): and (2) issues regarding proceedings held subsequent to the plea for the purpose *448 of determining the degree of the crime and the penalty to be imposed. [Citations.]' [Citation.] [¶] In determining whether an appeal is cognizable without a certificate of probable cause, `"the crucial issue is what the defendant is challenging, not the time or manner in which the challenge is made." [Citation.]' [Citation.] If the challenge is in substance an attack on the validity of the plea, defendant must obtain a certificate of probable cause. [Citation.]" (People v. Emery (2006) 140 Cal. App.4th 560, 564-565, 44 Cal.Rptr.3d 551 (Emery).)
"The purpose for requiring a certificate of probable cause is to discourage and weed out frivolous or vexatious appeals challenging convictions following guilty and nolo contendere pleas. [Citations.] The objective is to promote judicial economy `by screening out wholly frivolous guilty [and nolo contendere] plea appeals before time and money is spent preparing the record and the briefs for consideration by the reviewing court.' [Citations.]" (People v. Panizzon (1996) 13 Cal.4th 68, 75-76, 51 Cal.Rptr.2d 851, 913 P.2d 1061.)
Citing People v. Shelton (2006) 37 Cal.4th 759, 768-770, 37 Cal.Rptr.3d 354, 125 P.3d 290 (Shelton), the People contend, `"Regardless of how [Oglesby] frames his contention, a challenge to a negotiated sentence as part of a plea bargain is properly viewed as a challenge to the validity of the plea itself." We found no such holding in the case. Defendant in Shelton was sentenced to consecutive sentences for stalking and for making a criminal threat. His plea agreement called for a sentencing lid, and the sentenced imposed was within that lid. On appeal, he challenged the court's sentencing authority under section 654. (Id, at pp. 764-765, 37 Cal.Rptr.3d 354,125 P.3d 290.)
The Shelton court held that unlike a challenge to the court's discretionary sentencing choices, defendant's section 654 argument was a challenge to the validity of the plea. It explained the case was distinguishable from the decision in People v. Buttram (2003) 30 Cal.4th 773, 134 Cal. Rptr.2d 571, 69 P.3d 420 (Buttram), where it permitted an appeal without a certificate of probable cause when the trial court allegedly abused its discretion in sentencing a defendant within a specified sentencing range. In Buttram, defendant challenged his sentence after entering into a negotiated guilty plea to two felony counts with an "`indicated maximum term of six years.'" (Shelton, supra, 37 Cal.4th at p. 769, 37 Cal.Rptr.3d 354, 125 P.3d 290.) The Shelton court pointed out that under those circumstances, defendant was not challenging the court's authority to impose the lid sentence, but was merely seeking "`to implement the full terms of the bargain by raising appellate challenges to the exercise of individualized sentencing discretion within the agreed maximum that were reserved by the agreement itself.'" (Id. at p. 770, 37 Cal.Rptr.3d 354, 125 P.3d 290, quoting Buttram, supra, 30 Cal.4th at p. 790, 134 Cal.Rptr.2d 571, 69 P.3d 420.) It determined, "`when the claim on appeal is merely that the trial court abused the discretion the parties intended it to exercise, there is, in substance, no attack on a sentence that was "part of [the] plea bargain." [Citation.] Instead, the appellate challenge is one contemplated, and reserved, by the agreement itself.'" (Shelton, supra, 37 Cal.4th at p. 770, 37 Cal. Rptr.3d 354, 125 P.3d 290, italics omitted.) The Shelton court concluded defendant reserved the right to argue for a sentence below the lid, but had not reserved the right to challenge the lid sentence itself under section 654. (Id. at p. 769, 37 Cal. Rptr.3d 354,125 P.3d 290.)
To sum it up, defendant in Shelton needed a certificate of probable cause to challenge *449 the authority of the court to impose the lid sentence in violation of section 654. (Shelton, supra, 37 Cal.4th at p. 770, 37 Cal.Rptr.3d 354, 125 P.3d 290.) Oglesby is not challenging the court's authority to impose the six-year sentence. We also note Oglesby, unlike the defendant in Bittram, did not reserve any right to challenge the court's discretion because he bargained for a specific term, i.e., 6 years instead of 12 years, 8 months.
We find People v. Vera (2004) 122 Cal. App.4th 970, 18 Cal.Rptr.3d 896 (Vera) instructive. In that case, defendant made a postplea Marsden motion, raising several complaints about his counsel. (Id. at pp. 975-976, 18 Cal.Rptr.3d 896.) The trial court denied the Marsden motion, stating it wanted to give counsel an opportunity to look into some matters that might have been "overlooked," and it continued the case for a Romero[1] motion and a motion to withdraw the plea. (Id. at pp. 976-977, 18 Cal.Rptr.3d 896.) Defendant appealed the court's denial of the postplea Marsden motion. (Id at p. 977, 18 Cal.Rptr.3d 896.)
The Vera court concluded a certificate of probable cause was not required. (Vera, supra, 122 Cal.App.4th at p. 977, 18 Cal. Rptr.3d 896.) It reasoned, "The threshold issue raised by the postplea Marsden motion was whether defendant needed a new, substitute attorney in order to obtain effective representation. In People v. Smith (1993) 6 Cal.4th 684[, 25 Cal.Rptr.2d 122, 863 P.2d 192] ..., the California Supreme Court stated, `It is the very nature of a Marsden motion, at whatever stage it is made, that the trial court must determine whether counsel has been providing competent representation. Whenever the motion is made, the inquiry is forward-looking in the sense that counsel would be substituted in order to provide effective assistance in the future. But the decision must, always be based on what has happened in the past. The further one is in the process, the more counsel has done in the past that can be challenged, but that is a difference of degree, not kind.' [Citation.] We regard the issue of whether defendant currently needed a new attorney as a postplea issue not essentially implicating the validity of the no contest plea. [Citations.]" (Vera, supra, 122 Cal.App.4th at p. 978, 18 Cal.Rptr.3d 896.) It noted that "[a] determination that defendant is entitled to substitute counsel has no necessary implication for his no contest plea, which plea stands until a motion to withdraw it is made and granted." (Ibid.)
Similarly, here Oglesby's appeal concerns a postplea question. Was the trial court required to hold a competency healing before moving forward with the proceedings? "The law on competency is well established. A defendant is presumed competent unless it is proved otherwise by a preponderance of the evidence. (§ 1369, subd. (f).) As a matter of due process, the state may not try or convict a mentally incompetent defendant. [Citations.] Under section 1367, subdivision (a), a defendant cannot be tried or adjudged to punishment while he is mentally incompetent. Section 1368, subdivisions (a) and (b), respectively, require the trial court to initiate proceedings in order to determine a defendant's present sanity if a doubt arises in the mind of the judge as to the mental competence of the defendant or [i]f counsel informs the court that he or she believes the defendant is or may be mentally incompetent. To be competent to stand trial, defendant must have sufficient present ability to consult with his lawyer with a *450 reasonable degree of rational understanding and a rational as well as factual understanding of the proceedings against him. [Citations.]" (People v. Ramos (2004) 34 Cal.4th 494, 507, 21 Cal.Rptr.3d 575, 101 P.3d 478 (Ramos), internal quotation marks omitted.)
A competency hearing can be held at any stage in the proceedings prior to judgment. (See People v. Jones (1997) 15 Cal.4th 119, 134-136, 61 Cal.Rptr.2d 386, 931 P.2d 960 (Jones), overruled on another point in People v. Hill (1998) 17 Cal.4th 800, 823, fn. 1, 72 Cal.Rptr.2d 656, 952 P.2d 673 [after complaint filed defendant found incompetent in first competency hearing, hospital officials determined after four months defendant's competency had "been restored," two years later the court held a second competency hearing and defendant was deemed competent].) The court's duty to conduct a hearing is triggered anytime the accused presents substantial evidence of incompetence. (Jones, supra, 15 Cal.4th at p. 149, 61 Cal.Rptr.2d 386, 931 P.2d 960.) "The court's decision whether to grant a competency hearing is reviewed under an abuse of discretion standard. [Citations.]" (Ramos, supra, 34 Cal.4th at p. 507, 21 Cal. Rptr.3d 575, 101 P.3d 478.)
The issue of competency was raised by counsel after Oglesby entered his plea. His notice of appeal specifies, "This appeal is based on the sentence or other matters occurring after the plea." The only issue raised in Oglesby's appeal is whether the court should have halted the proceedings to determine if he would be able to understand the nature of the sentencing proceedings in the future. He does not seek to set aside the plea, or his bargained for six-year sentence.
Thus, like a Marsden motion, Oglesby's request for a competency hearing is forward looking. Although the court's inquiry would necessarily be based in part on what has happened in the past, the decision does not necessarily implicate the validity of the guilty plea. If Oglesby had been found mentally incompetent, the criminal proceedings would have been suspended and he would have been ordered committed to a hospital before his sentence was imposed. The plea would remain intact because he does not challenge it.
We recognize this creates somewhat of an absurdity, to think that in the same courtroom, same proceeding, on the same day, and at the same hour, the defendant could be competent to' enter a plea but incompetent to be sentenced. It appears Oglesby's strategy by this appeal is to enable him to serve part, or all, of his sentence in a hospital as opposed to prison. Yet, because his appeal uniquely challenges only postplea sentencing procedures and not the plea, we conclude a certificate of probable cause was not necessary.
But this is a hollow victory for Oglesby. Based on the record, it cannot be said the court abused its discretion in failing to suspend proceedings for a second competency determination before sentencing. "`When a competency hearing has already been held and the defendant has been found competent to stand trial ... a court need not suspend proceedings to conduct a second competency hearing unless it. "is presented with a substantial change of circumstances or with new evidence" casting a serious doubt on the validity of that finding. [Citations.]' [Citations.]" (Jones, supra, 15 Cal.4th at p. 150, 61 Cal.Rptr.2d 386, 931 P.2d 960.) Based on the record before us, Oglesby cannot jump this hurdle.
Early in these criminal proceedings the issue of Oglesby's competency was considered and ruled upon. After the court read *451 the reports from two mental health professionals, the prosecution and defense counsel waived the right to a hearing, waived the presence of the doctors, and submitted the issue of mental competence based on the report of the doctor who opined Oglesby was mentally competent to stand trial. Thereafter, no issues regarding Oglesby's mental competency were raised during the various pretrial evidentiary hearings. There was no reason for the court to suspect his competency status had changed.
To the contrary, the record reflects Oglesby was well aware of what was happening in his case and he expressed dissatisfaction with his legal counsel. His distrust, not lack of understanding, was the reason given for why he wanted to plea bargain. Oglesby made it very clear he did not want to proceed to trial unless he was given a new attorney. His attorney concurred this was the reason Oglesby wanted to plead guilty. We conclude Oglesby's decision to forego a trial simply because he distrusted his attorney does not amount to substantial evidence of incompetence. (See Ramos, supra, 34 Cal.4th at p. 509, 21 Cal.Rptr.3d 575, 101 P.3d 478 [defendant's preference for the death penalty not substantial evidence of incompetence or evidence requiring the court to order a psychiatric evaluation].)
Moreover, defense counsel's assertion Oglesby had been "seen'' by mental health professionals and that Oglesby suffer from a "severe organic impairment in his brain" was neither new evidence nor a substantial change in circumstances Three months earlier, the court considered the reports of two psychiatrists about Oglesby's mental status, and accepted the parties' submission of the issue on the report stating Oglesby was competent to stand trial. There is no reason to suspect his brain "impairment" had worsened or otherwise changed.

III
The judgment is affirmed.
WE CONCUR: RYLAARSDAM, Acting P. J., and BEDSWORTH, J.
NOTES
[1]  People v. Superior Court (Romero) (1996) 13 Cal.4th 497, 53 Cal.Rptr.2d 789, 917 P.2d 628.
