The trial court exceeded its authority when, over the prosecutor’s objection, it accepted a plea in exchange for a sentence that could only be imposed by dismissing an enhancement per section 1385. In this People’s appeal, the prosecution argued that the trial court engaged in unlawful judicial plea bargaining when it allowed the defendant to plead guilty to all charges in exchange for a sentence that could only be reached by dismissing an enhancement. The Court of Appeal agreed. A judge can encourage resolution of a case by giving an indicated sentence in exchange for the defendant admitting all charges and special allegations. But in an indicated-sentence situation no charges are reduced. This arrangement included the anticipated dismissal of an enhancement because the promised sentence could only be reached by its dismissal. In substance this was no different than the trial court agreeing to dismiss the enhancement before taking the plea, and such an agreement could only be made with the prosecutor’s consent.