Shelton entered into a negotiated plea agreement whereby he pleaded no contest to two of the charged six felony offenses in return for a “lid” sentence of three years and eight months. He appealed, arguing that the sentence for one of the offenses should have been stayed pursuant to section 654. The appellate court agreed and reversed. The Supreme Court granted review in this case to determine whether a defendant must obtain a certificate of probable cause to challenge on appeal the trial court’s authority to impose the maximum or “lid” sentence. The Court reversed the Court of Appeal’s judgment. The inclusion of a sentencing “lid” implies a mutual understanding that the trial court has authority to impose the maximum sentence. It preserves only the defendant’s right to urge that the trial court should or must exercise its discretion in favor of a shorter term. Therefore, a challenge to the trial court’s authority to impose the maximum sentence is a challenge to the validity of the plea, which requires a certificate of probable cause.