(a) Waiver of Right to Appeal.—After entry of judgment in a general or special court-martial, under procedures prescribed by the Secretary concerned, the accused may waive the right to appellate review in each case subject to such review under section 866 of this title (article 66). Such a waiver shall be—

(1) signed by the accused and by defense counsel; and

(2) attached to the record of trial.


(b) Withdrawal of Appeal.—In a general or special court-martial, the accused may withdraw an appeal at any time.

(c) Death Penalty Case Exception.—Notwithstanding subsections (a) and (b), an accused may not waive the right to appeal or withdraw an appeal with respect to a judgment that includes a sentence of death.

(d) Waiver or Withdrawal as Bar.—Except as provided by section 869(c)(2) of this title (article 69(c)(2)), a waiver or withdrawal under this section bars review under section 866 of this title (article 66).