concurring, with whom LOKEN,8 Chief Judge, BOWMAN, and RILEY, Circuit Judges, join.
There is a great deal in the court’s opinion with which to agree. The court observes, for instance, that the right to appeal is not a constitutional one and that courts ought to treat plea agreements as contracts; these. are propositions with which I wholeheartedly concur. But, with respect, I think that the court abandons those principles, in deciding the case the way that it does.
First of all, the court makes no attempt to justify its distinction between sentences that violate the sentencing guidelines and sentences that are “illegal.” A sentence that violates a guideline is no less illegal in kind than a sentence that violates a statute. Indeed, the guidelines are authorized by statute, and in any case a legal error with respect to a guideline is no less a legal error than a mistaken application of statutory law.
Nor is a guideline error necessarily different in degree from any other kind of legal error. A mistaken application of the guidelines might, for instance, result in a sentence that is too long by many years, while a sentence that exceeds the statutory maximum might do so, say, by only one day. Yet the court holds that a defendant may waive his right to appeal the one sentence and not the other. The distinction is untenable, and the court makes no attempt to defend it. The court simply announces a rule.
Secondly, and more fundamentally, while the court professes loyalty to the idea that ordinary principles of contract law ought to apply to plea agreements, it refuses to adhere, again without explanation, to the most fundamental contract principle of all, namely, that agreements supported by consideration ought to be enforced absent fraud, duress, mistake, or some other disabling circumstance. It is *895certainly true that courts have the right and duty to police pleas and plea agreements to ensure that defendants make them knowingly and voluntarily. That is the function of the inquiries set out in Federal Rule of Criminal Procedure 11 and, especially, in Rule 11(b), (c), and (d). Indeed, Rule ll(b)(l)(N) specifically requires the court to make sure that the defendant understands “the terms of any plea-agreement provision waiving the right to appeal or to collaterally attack the sentence,” and, significantly, the rule contemplates no restrictions whatever on a defendant’s ability to waive appeal rights. But once a court is convinced that a defendant is knowingly and voluntarily making a waiver, I believe that its function is complete.
Rule 11 is instructive in yet other ways. Under it, a defendant who pleads guilty is made to understand the fundamental constitutional rights that he or she is giving up, including the right to be represented by counsel at trial, the right to jury trial, the right to cross-examine witnesses,"the right not to incriminate oneself, and the right to compel the attendance of witnesses. Yet the court holds without explanation that the right to appeal the court’s sentence, a right that the due process clause does not even guarantee, cannot always be waived in a solemn, public, and counseled proceeding before a federal judicial officer. Contrary to what the court asserts, Rule 11(c) does not give a district court “the authority to reject most plea agreements.” In fact, it gives the court the authority to reject only certain kinds of agreements under very circumscribed circumstances, none of which is present here.
Not only does the court lack the authority to restrict plea agreements in the way that it seeks to, there are good reasons not to do so, not the least of which is that the restriction works to the detriment of defendants. One of the few things that a criminal defendant has to trade with his or her accuser is the right to appeal, and so the court, far from improving the lot of criminal defendants with its interventionist rule, actually deprives them of their property and the wherewithal with which to bargain. As is often the case with paternalistic policies, moreover, there are other inefficiencies created as well, including, as this case demonstrates, the judicial energy that must now be devoted to deciding whether a sentence is a “miscarriage of justice” (or “illegal”) within the meaning of the distinction that the court draws here. Furthermore, the utility of plea agreements is diminished by today’s decision, because courts will frequently be driven to decide the merits of an appeal to. avoid being entangled in the question of whether an “illegal sentence” is involved in an appeal waiver, in much the same way that complicated procedural-default rules have operated in the law of habeas corpus. As a result, the government’s enthusiasm for appeal waivers will wane, further reducing the opportunities of criminal defendants to enter into advantageous bargains.
The difficulty with applying the distinction that the court proposes is amply demonstrated in the present circumstances. Mr. Andis claims that his sentence violated a statute that requires that his conditions of supervised release be “reasonably related” to certain “factors” and “reasonably necessary” to accomplish certain objectives. See 18 U.S.C. § 3583(d). Is a sentence that does not conform to those standards not “illegal”? If it is not, why isn’t it? The court concludes that the appeal waiver prevents us from reviewing the conditions imposed, a result with which I agree, but it doesn’t tell us why this particular kind of assigned error is not reviewable and others are. Evidently we are now put to the necessity of making a case-by-case determination of whether a claim put forward by a defendant involves or does *896not involve something called an “illegal sentence.”
One final observation. It is true that a criminal defendant will not be able to foresee all of the errors that a district court might commit in the course of a sentencing. But the law of contracts has never required that a risk be specifically foreseeable before a court will enforce a party’s assumption of that risk. In fact, one of the principle purposes of a contract is to assign the risk of the unforeseen to one party or another. To be sure, a plea agreement must be entered into knowingly and with a knowledge of the consequences, but that only means, in the present context, that a defendant must know that one of the consequences of his agreement is that he or she will have no recourse to the court of appeals in the event of an error on the part of the district court. There is no doubt that Mr. Andis knew that here.
For the foregoing reasons, I would simply enforce the waiver.
. The Honorable James B'. Loken became Chief Judge of the United States Court of Appeals for the Eighth Circuit on April 1, 2003.