In a delinquency proceeding, where the plea agreement of the parties, as agreed to by the court, specified a specific placement, the prosecution is entitled to the bargained-for disposition. In exchange for the dismissal of other charges, minor admitted attempted robbery and criminal threats allegations with the understanding he would be adjudicated a ward of the court and placed in a Youth Offender Program (YOP). A subsequent probation report, however, recommended probation and an out-of-home placement instead of placement in YOP. Denying the prosecution’s request to set aside the plea agreement, the court adopted the recommendation in the probation report and placed the minor in the custody of the probation officer. The prosecution appealed. As a preliminary matter, the appellate court found the prosecution’s challenge could be reached on appeal because it challenged the court’s failure to accept the negotiated plea bargain, as opposed to the grant of probation, which can only be reached by writ review (Welf. & Inst. Code § 800, subd. (c)). The court then found that when a court approves the terms of a plea bargain, it also agrees to be bound by them. In the instant case, if the court decided not to place minor at YOP, as contemplated by the negotiation, it was required to set aside the plea and reinstate all the original allegations of the petitions.