(a) Each rehearing under this chapter shall take place before a court-martial composed of members not members of the court-martial which first heard the case. Upon a rehearing the accused may not be tried for any offense of which he was found not guilty by the first court-martial, and no sentence in excess of or more severe than the original sentence may be adjudged, unless the sentence is based upon a finding of guilty of an offense not considered upon the merits in the original proceedings, or unless the sentence prescribed for the offense is mandatory.

(b) If the sentence adjudged by the first court-martial was in accordance with a plea agreement under section 853a of this title (article 53a) and the accused at the rehearing does not comply with the agreement, or if a plea of guilty was entered for an offense at the first court-martial and a plea of not guilty was entered at the rehearing, the sentence as to those charges or specifications may include any punishment not in excess of that which could have been adjudged at the first court-martial, subject to such limitations as the President may prescribe by regulation.

(c) If, after appeal by the Government under section 856(d) of this title (article 56(d)), the sentence adjudged is set aside and a rehearing on sentence is ordered by the Court of Criminal Appeals or Court of Appeals for the Armed Forces, the court-martial may impose any sentence that is in accordance with the order or ruling setting aside the adjudged sentence, subject to such limitations as the President may prescribe by regulation.