In English law, a defendant who pleads a frivolous plea, or a plea merely for the purpose of delaying the suit or who for the same purpose files a similar demurrer, may be compelled by rule or by a judge’s order to abide by that plea or demurrer, or to plead peremptorily on the morrow. A motion can also be made in court for rule to abide or plead instanter, if the plea is made near the end of a term. If the defendant when ruled, do not abide, s/he can only plead the general issue but may add notice of set-off.
In U.S. abiding by plea could mean abiding by the terms and conditions in a plea agreement. Plea bargaining or agreements are constitutional so long as prosecutors perform all the terms of the agreement and do not threaten defendants with charges unsupported by probable cause.
A defendant can enter into plea agreements or plea bargains whereby a person accused of a crime pleads guilty to a specified charge in return for an agreed upon sentence, a sentence recommendation to the judge, or the dismissal or reduction of other charges. Usually the defense counsel and prosecutor negotiate the charges to be brought. The parties must disclose the plea agreement in open court when the plea is offered. The court can either accept or reject or defer the decision on the plea agreement. The defendant can withdraw a plea of guilty before the court accepts the plea for some reason or no reason. Once the court accepts the plea, it can be withdrawn before the sentence is imposed if the court rejects the plea agreement or if the defendant shows a fair and just reason for requesting the withdrawal. After the court imposes sentence, the defendant may not withdraw a plea of guilty or nolo contendere, and the plea may be set aside only on direct appeal or collateral attack.
Specific aspects of the process vary from one jurisdiction to another.
USCS Federal Rules of Criminal Procedure Rule 11 specifies the procedure for plea agreement. It reads as follows
USCS Fed Rules Crim Proc R 11
(c) Plea Agreement Procedure.
(1) In General. An attorney for the government and the defendant's attorney, or the defendant when proceeding pro se, may discuss and reach a plea agreement. The court must not participate in these discussions. If the defendant pleads guilty or nolo contendere to either a charged offense or a lesser or related offense, the plea agreement may specify that an attorney for the government will:
(A) not bring, or will move to dismiss, other charges;
(B) recommend, or agree not to oppose the defendant's request, that a particular sentence or sentencing range is appropriate or that a particular provision of the Sentencing Guidelines, or policy statement, or sentencing factor does or does not apply (such a recommendation or request does not bind the court); or
(C) agree that a specific sentence or sentencing range is the appropriate disposition of the case, or that a particular provision of the Sentencing Guidelines, or policy statement, or sentencing factor does or does not apply (such a recommendation or request binds the court once the court accepts the plea agreement).