dissenting:
John Dunn repeatedly struck his two-month old son causing massive, permanent brain damage. Despite the child’s crying and the struggling noises he made throughout the remainder of the day, Dunn did nothing to seek medical care; and when his wife returned home from work around 5:30 p.m., and insisted on calling a doctor, Dunn vehemently objected and pitched a bottle through a window, shattering it. Not until his wife threatened to call a lawyer did he agree to drive her and - the child to the doctor. Once prosecuted, Dunn decided to plead nolo contendere to one count of aggravated assault and one count of endangerment of the welfare of a child. In return for his plea the state prosecutor dropped two other charges, agreed to five years of probation for the charge of endangering the welfare of a child, and promised to recommend a minimum sentence in the standard range for the charge of aggravated assault.
Granting Dunn habeas relief, the majority holds that the state courts unreasonably applied Supreme Court precedent in evaluating the prosecutor’s compliance with the plea agreement at sentencing. The majority also suggests that harmless-error analysis does not apply to habeas review of an alleged breach of a plea agreement.
I respectfully disagree with both conclusions, and believe that the majority’s opinion may have far-reaching consequences. According to data collected by the U.S. Sentencing Commission, pleas accounted for 94.6% of all federal convictions in fiscal year 1999, 93.6% in 1998, 93.2% in 1997, 91.7% in 1996, and 91.9% in 1995. See U.S. Sentencing Commission, Datafile, http://www.ussc.gov. And similar figures undoubtedly apply to state convictions. One recent study, for example, found that less than 5% of state felony criminal cases were disposed of through jury trial. Jeffrey Abramson, We, The Jury 252 (2000). What this data demonstrates is that a ha-beas decision affecting pleas and sentencing will have vastly greater impact than any influencing procedure at trial.
I
The breach of the plea agreement occurred, according to the majority, when the prosecutor made a recommendation for the charge of aggravated assault. To evaluate what the prosecutor promised for that count, it is important to understand that in Pennsylvania a convicted defendant receives a minimum and a maximum sentence. See Majority Op. at 458 (citing 42 Pa.C.S.A. § 9756(a) and (b); Stewart v. Pennsylvania Bd. of Probation and Pa*465role, 714 A.2d 502, 505-06 (Pa.Cmwlth.1998)). The minimum sentence is usually established by applying sentencing guidelines, which allow the sentencing judge to select the defendant’s minimum sentence from one of three ranges — a mitigated, standard, or aggravated range. A defendant’s maximum sentence, by contrast, is limited only by the statutory maximum.
In Dunn’s case the standard range for the minimum sentence was 36-to-60 months, while the statutory maximum sentence was 20 years. On appeal Dunn’s first argument is that what the prosecutor actually agreed to do was recommend a single sentence at the bottom end of the standard range, i.e., the lowest or minimum sentence in the standard range, which is a sentence of 36 months. But as the majority concludes, this argument rests on an incorrect interpretation of the plea agreement. Defendants do not receive a single determinate sentence under Pennsylvania law, and it is clear from the record that all that the prosecutor agreed to do was “recommend a minimum sentence in the standard range.” App. at 87. What Dunn’s argument neglects is that the term “minimum” does not refer to the low end of the standard range but to the first part of the defendant’s sentence — the minimum sentence. In other words, if the prosecutor had recommended a particular minimum sentence near the top of the standard range, that would have been entirely consistent with the plea agreement.
Against this legal background we must evaluate Dunn’s second objection, the argument that the majority accepts. Dunn maintains that the prosecutor improperly requested a “lengthy term of incarceration” or “a penalty that’s considerable.” App. at 145-46. Like the prosecutor, the state courts, and the District Court, I believe that these remarks were consistent with the plea agreement. The majority acknowledges that the plea agreement did not require the prosecutor to advocate for leniency within the standard range, and there is no clearly established Supreme Court precedent for finding that the prosecutor had an implied duty to do so. Cf. United States v. Benchimol, 471 U.S. 453, 105 S.Ct. 2103, 85 L.Ed.2d 462 (1985) (per curiam) (rejecting that a plea agreement included an implied duty to make a recommendation enthusiastically). The prosecutor was entitled to urge, even vigorously, that the judge sentence at the high end of the range, and as both Dunn and the majority implicitly recognize, nothing limited the prosecutor from presenting compelling evidence to convince the judge to do so. The majority opinion also makes clear that the sentencing judge and the prosecutor repeatedly reviewed the prosecutor’s obligation to recommend that the minimum sentence fall in the standard range, and the sentencing judge understood this point. Moreover, the plea agreement imposed no limitation at all about the maximum sentence.
When the state trial judge (the same judge as it happens who sentenced Dunn) rejected Dunn’s petition for post-conviction collateral relief, the judge wrote that the prosecutor’s request for a “lengthy” sentence was “consistent with the plea agreement in that the standard range of sentencing for Defendant’s aggravated assault charge extended to a minimum of five (5) years of incarceration.” App. at 300. The state inter mediate appellate court similarly reasoned that the prosecutor’s remarks were consistent with the plea agreement because the standard sentence range of three-to-five years for the minimum sentence “can be viewed as ‘lengthy’ in and of itself.” App. at 273. Expanding on this reasoning, the District Court noted in denying Dunn’s habeas petition that in 1993, the year Dunn was sentenced, the mean minimum sentence in Pennsylvania for ag*466gravated assault was 13.2 months and the mean maximum was 35.6 months. Thus, any minimum sentence in the standard range of 36-to-60 months, the District Court reasoned, “would, against these averages, be ‘lengthy.’ ” App. at 51 n. 1.
Because Dunn’s petition is governed by the 1996 AEDPA amendments to the federal habeas statute, we do not review a state court’s legal determinations under a de novo standard. See Williams v. Taylor, 529 U.S. 362, 402-13, 120 S.Ct. 1495, 1518-23, 146 L.Ed.2d 389 (2000); Weris v. Vaughn, 228 F.3d 178, 196-97 (3d Cir.2000). Federal courts do not exercise the same general supervisory powers over state courts that federal appellate courts do over federal district courts. We cannot grant habeas relief unless the state-court decision is “contrary to, or involved an unreasonable application of, clearly established Federal law, as determined by the Supreme Court of the United States.” 28 U.S.C. § 2254(d)(1).
In Williams the Supreme Court devised separate legal standards for the “contrary to” and “unreasonable application of’ clauses. The majority implies that it is confining itself to the “unreasonable application” standard because Dunn only challenged the state-court decision under that provision. See Majority Op. at 457. But in fact, Dunn’s brief makes no such distinction between the two standards and instead states, “Whether the government violated the plea agreement is a question of law and review is plenary.” Appellant’s brief at 22.
The deferential “unreasonable application” standard controls “if the state court identifies the correct governing legal rule from [the Supreme] Court’s cases but unreasonably applies it to the facts of the particular state prisoner’s case.” Williams, 529 U.S. at 407, 120 S.Ct. at 1520. In some cases there may be some doubt about whether the “contrary to” or “unreasonable application” clause applies, see, e.g., Hameen v. State of Delaware, 212 F.3d 226, 242 (3d Cir.2000), but here the state courts understood that a prosecutor is obliged to adhere to promises in a plea agreement. See Mabry v. Johnson, 467 U.S. 504, 509, 104 S.Ct. 2543, 2547, 81 L.Ed.2d 437 (1984); Santobello v. New York, 404 U.S. 257, 92 S.Ct. 495, 30 L.Ed.2d 427 (1971). Because the state courts understood the controlling legal rule and the only question is whether the courts correctly applied that rule to these facts, there is no doubt that the “unreasonable application standard” applies. “[A] run-of-the-mill state-court decision applying the correct legal rule from our cases to the facts of a prisoner’s case would not fit comfortably within § 2254(d)(l)’s ‘contrary to’ clause.” Williams, 529 U.S. at 406, 120 S.Ct. at 1520.
The Supreme Court has emphasized that “an unreasonable application of federal law is different from an incorrect application of federal law.” Williams, 529 U.S. at 412, 120 S.Ct. at 1522 (emphasis in original). The majority must conclude, therefore, that even though the prosecutor was entitled to advocate against leniency, and even though the prosecutor and the state judge had repeatedly reviewed and affirmed the exact requirements of the plea agreement, the state courts were not merely incorrect in finding that the term “lengthy” could refer to the top of the standard range, they were objectively unreasonable. Given the context of this case and that the term “lengthy” is relative, I cannot agree. Three hours, for example, is a long time for a movie but not for the flu. Likewise, just as we could properly say that a person had a “lengthy” hospital stay when he stayed ten out of a possible one-to-ten days, so too for speaking of the lengthy end of a range of 36-to-60 months *467of prison. Even in absolute terms, there is nothing improper about calling a five-year sentence “lengthy.”
The prosecutor’s request for a lengthy sentence did telegraph her desire that the court not be lenient, but what the majority ignores in complaining about this effect is that under the terms of the plea agreement she was legitimately entitled to say that she thought the judge should not be lenient either within the standard range or in determining a maximum sentence.
II
The majority also maintains that harmless-error doctrine does not apply to a prosecutor’s breach of a plea agreement when a state prisoner brings a habeas petition. The central problem with the majority’s analysis is that it fails to distinguish the doctrine’s application on direct review from that on habeas. In 1998 the Supreme Court held that there is a distinct harmless-error standard that applies in federal habeas cases and imposes a “less onerous” burden for upholding the state conviction. Brecht v. Abrahamson, 507 U.S. 619, 637, 113 S.Ct. 1710, 1722, 123 L.Ed.2d 353 (1993). And that lower standard applies regardless of whether the state court conducted a harmless-error review. Hassine v. Zimmerman, 160 F.3d 941, 950-53 (3d Cir.1998) (collecting cases).1
The Supreme Court noted in Brecht that there are numerous instances where the Court distinguishes between the relief available on direct review and that for habeas. For example, “Although new rules always have retroactive application to criminal cases on direct review, we have held that they seldom have retroactive application to criminal cases on federal habeas.” Brecht, 507 U.S. at 634, 113 S.Ct. at 1720 (citations omitted). Another example is that the Fourth Amendment’s exclusionary rule cannot be invoked in habeas. Stone v. Powell, 428 U.S. 465, 96 S.Ct. 3037, 49 L.Ed.2d 1067 (1976). Similarly, defendants have a right to counsel for direct appeals, Douglas v. California, 372 U.S. 353, 355, 83 S.Ct. 814, 815, 9 L.Ed.2d 811 (1963), but not for collateral attacks on the conviction. Pennsylvania v. Finley, 481 U.S. 551, 555-56, 107 S.Ct. 1990, 1993, 95 L.Ed.2d 539 (1987). After noting the many ways that relief differs under habeas — differences that have only expanded since Brecht with the passage of the AED-PA — the Supreme Court explained: “The reason most frequently advanced in our cases for distinguishing between direct and collateral review is the State’s interest in the finality of convictions that have survived direct review within the state court system. We have also spoke of comity and federalism.... ‘Federal intrusions into state criminal trials frustrate both the States’ sovereign power to punish of fenders and their good-faith attempts to honor constitutional rights.’ ” Brecht, 507 U.S. at 635, 113 S.Ct. at 1720.
When a constitutional challenge is focused on a state court’s evaluation of sentencing and the alleged err or is harmless, these concerns with federalism and comity *468should be at their height. Habeas corpus, the Supreme Court has repeatedly said, is an “extraordinary remedy” reserved for defendants who were “grievously wronged” by the criminal proceedings. Calderon v. Coleman, 525 U.S. 141, 146, 119 S.Ct. 500, 503, 142 L.Ed.2d 521 (1998) (per curiam) (quoting Brecht, 507 U.S. at 633-34, 113 S.Ct. at 1719; Fay v. Noia, 372 U.S. 391, 440-41, 83 S.Ct. 822, 850, 9 L.Ed.2d 837 (1963)). The Supreme Court has explained that a federal court disregards these concerns with federalism and comity when it sets aside a state-court sentence without deter mining that the error had a “substantial and injurious effect.” Calderon, 525 U.S. at 146, 119 S.Ct. at 503. “The social costs of retrial or resentencing are significant, and the attendant difficulties are acute ... where the original sentencing hearing took place ... [long ago]. The State is not to be put to this arduous task based on mere speculation that the defendant was prejudiced ....” Id. (citing Brecht, 507 U.S. at 637, 113 S.Ct. at 1721).
Relief in this case is unwarranted. The state courts were reasonable to find that the prosecutor’s use of the term “lengthy” was consistent with the plea agreement given that the prosecutor retained the right to advocate for the top end of the standard range; the state sentencing judge made abundantly clear that he understood the limitations included in the plea agreement; and when sentencing Dunn to a minimum sentence of seven- and-a-half years and a maximum sentence of twenty years, the judge stressed a factor not emphasized by the prosecutor. The judge explained that he was “extremely troubled” by the fact that Dunn did nothing to seek medical advice throughout the day, despite the obvious signs of injury to his infant son. App. at 452. Worse, Dunn threatened his wife by breaking a window when she attempted to seek medical advice and would not drive her and the child to a doctor until she said she would call a lawyer. As the majority opinion details, the evidence at sentencing against Dunn was overwhelming. Dunn’s wife gave the following description of her son’s condition at the sentencing hearing:
He vomits all the time, he’s in tremendous pain, he has to take a lot of medications. It’s usually accompanied with vomiting. It can damage his liver if it’s not monitored properly. He constantly has to have his blood level drawn. He’s constantly — he has mucous and he can’t clear his own mucous. He is in danger of aspirating if he inhales it all back into his lungs, which can cause pneumonia.
App. at 394. She added that her son was fed through a tube into his stomach, would cry for three hours at a time, and had no motor skills at fifteen months, the infant’s age at sentencing. No one disputed that the child’s life expectancy was no more than two-to-seven years, and that he would require nearly constant medical care during that time. It also should be emphasized that the source of harm the majority must rely upon is the difference in effect between what they say was impermissible — the prosecutor’s use of the terms “lengthy” and “considerable” — and the word choice that undeniably would have been permissible — a request by the prosecution for the highest minimum sentence in the standard range.
The majority’s analysis is also rewarding exactly the sort of tactical use of federal habeas relief that the Supreme Court has sought to prevent. See, e.g., Brecht, 507 U.S. at 635, 113 S.Ct. at 1720-21 (citing Engle v. Isaac, 456 U.S. 107, 127, 102 S.Ct. 1558, 1571, 71 L.Ed.2d 783 (1982); Rose v. Lundy, 455 U.S. 509, 547, 102 S.Ct. 1198, 1218, 71 L.Ed.2d 379 (1982)). At Dunn’s state post-conviction hearing, the trial judge engaged in the following colloquy *469with the lawyer who represented Dunn at the original plea and sentencing hearings:
The Court: There had been plea negotiations over some period of time; is that correct?
Mr. Barr: Absolutely.
The Court: And the plea negotiations or the plea that was previously offered, were there better terms in your estimation?
Mr. Barr: Yes. The longer this case went on, the worse the terms became because the child’s condition became worse.
The Court: I see. In other words — the condition of that child was what, Mr. Barr?
Mr. Barr: Very, very serious. He had very serious brain injury.
App. at 332-33. In his findings of fact, the trial judge concluded that after Dunn was charged, he “was open to the possibility of a guilty plea and plea negotiations were conducted over a lengthy period of time. The terms of the agreement offered by the Commonwealth, however, became less attractive as the child’s conditioned [sic] worsened. Attorney Barr believed that a plea was in Defendant’s best interest as Defendant could face homicide charges if the child were to die.” App. at 296-97. It is a fair inference that the reason Dunn declined to file a direct appeal is that even if the appellate court agreed there had been a breach of the plea agreement (and later events show that the court thought there was no breach), the chance that the plea would have been vacated exposed Dunn to potential homicide charges at worst, and less favorable plea terms at best.
And contrary to the majority’s suggestion in footnote 7, Dunn could not have been sure that if he appealed and the child died, he would be able to avoid having his plea vacated, for Santobello does not give a criminal defendant the right to choose between resentencing or having the plea vacated. Chief Justice Burger’s majority opinion concluded, “The ultimate relief to which petitioner is entitled we leave to the discretion of the state court....” Santobello, 404 U.S. at 263, 92 S.Ct. 495. The separate opinions in Santobello do not provide authority otherwise. Neither Justice Douglas’s opinion, which no other Justice joined, nor Justice Marshall’s opinion, which attracted two other votes, provides a basis for rejecting the majority opinion’s rule that the lower court retains discretion about the choice of relief.
The majority’s reason for concluding that harmless error does not apply is that in Santobello — a direct-review case — the Supreme Court said that it would remand to the state courts even though the state sentencing judge said that the prosecutor’s breach of the plea agreement did not affect the sentence he imposed. Relying exclusively on this aspect of Santobello this circuit has continued to say in cases involving direct review that harmless error does not apply to a prosecutor’s breach of a plea agreement. See United States v. Nolan-Cooper, 155 F.3d 221, 236 (3d Cir.1998) Cciting United States v. Hayes, 946 F.2d 230, 233 (3d Cir.1991) (citing Santobello)).
We have never, however, addressed whether Santobello’s conclusion about harmless error should be expanded to apply in habeas and in the teeth of the Supreme Court’s more recent decision, Brecht. Indeed, in the thirty years since Santobello was decided, there has been an avalanche of cases expanding harmless-error analysis to constitutional errors occurring during all phases of criminal trials and sentencing. See, e.g., Neder v. United States, 527 U.S. 1, 119 S.Ct. 1827, 144 L.Ed.2d 35 (1999) (jury instruction’s omission of materiality requirement, an offense element, was harmless error); Yates v. *470Evatt, 500 U.S. 391, 111 S.Ct. 1884, 114 L.Ed.2d 432 (1991) (harmless error applied to mandatory rebuttable presumption in jury instructions); Arizona v. Fulminante, 499 U.S. 279, 306-09, 111 S.Ct. 1246, 1263-64, 113 L.Ed.2d 302 (1991) (harmless error applied to coerced confessions that were admitted into evidence); Clemons v. Mississippi, 494 U.S. 738, 752-54, 110 S.Ct. 1441, 1450-51, 108 L.Ed.2d 725 (1990) (applying harmless error to unconstitutionally overbroad jury instructions at the sentencing stage of a capital case); Satterwhite v. Texas, 486 U.S. 249, 108 S.Ct. 1792, 100 L.Ed.2d 284 (1988) (admission of evidence at the sentencing stage of a capital case in violation of the Sixth Amendment Counsel Clause); Carella v. California, 491 U.S. 263, 266, 109 S.Ct. 2419, 2421, 105 L.Ed.2d 218 (1989) (jury instructions containing an erroneous conclusive presumption); Pope v. Illinois, 481 U.S. 497, 501-504, 107 S.Ct. 1918, 1921-23, 95 L.Ed.2d 439 (1987) (jury instruction misstating an element of the offense); Rose v. Clark, 478 U.S. 570, 106 S.Ct. 3101, 92 L.Ed.2d 460 (1986) (jury instructions containing erroneous rebuttable presumption); Crane v. Kentucky, 476 U.S. 683, 691, 106 S.Ct. 2142, 2147, 90 L.Ed.2d 636 (1986) (erroneous exclusion of defendant’s testimony about the circumstances of his confession); Delaware v. Van Arsdall, 475 U.S. 673, 106 S.Ct. 1431, 89 L.Ed.2d 674 (1986) (unconstitutional restriction on defendant’s right to cross-examine a witness); Rushen v. Spain, 464 U.S. 114, 117-18, and n. 2, 104 S.Ct. 453, 454-55, and n. 2, 78 L.Ed.2d 267 (1983) (denial of defendant’s right to be present at trial); United States v. Hasting, 461 U.S. 499, 103 S.Ct. 1974, 76 L.Ed.2d 96 (1983) (unconstitutional comment on defendant’s silence at trial in violation of Fifth Amendment); Hopper v. Evans, 456 U.S. 605, 102 S.Ct. 2049, 72 L.Ed.2d 367 (1982) (unconstitutional statute forbidding trial court from giving jury instruction on lesser included offense in a capital case); Kentucky v. Whorton, 441 U.S. 786, 99 S.Ct. 2088, 60 L.Ed.2d 640 (1979) (failure to instruct jury on presumption of innocence); Moore v. Illinois, 434 U.S. 220, 232, 98 S.Ct. 458, 466, 54 L.Ed.2d 424 (1977) (evidence admitted in violation of Sixth Amendment); Brown v. United States, 411 U.S. 223, 231-32, 93 S.Ct. 1565, 1570-71, 36 L.Ed.2d 208 (1973) (admission of out-of-court statement of nontestifying codefend-ant in violation of Sixth Amendment); Milton v. Wainwright, 407 U.S. 371, 92 S.Ct. 2174, 33 L.Ed.2d 1 (1972) (confession unconstitutionally obtained).
The majority implies that harmless-error analysis should not apply to a breach of a plea agreement because, the majority asserts, such a violation is structural error. The majority is correct that the “Kotteakos standard [invoked in Brecht] did not apply to ‘structural defects in the constitution of the trial mechanism, which defy analysis by ‘harmless-error’ standards.’ ” California v. Roy, 519 U.S. 2, 5, 117 S.Ct. 337, 338, 136 L.Ed.2d 266 (1996) (per curiam) (quoting Brecht, 507 U.S. at 629, 113 S.Ct. at 1717). But the trouble with the majority’s argument is that the Supreme Court has never said violations of Santobello are structural error, and there is a “strong presumption” against finding that a given type of constitutional violation is structural. Rose v. Clark, 478 U.S. at 579, 106 S.Ct. at 3106. Twice in recent years the Supreme Court has listed the “very limited class of cases” where the error is deemed structural, see Neder, 527 U.S. at 8, 119 S.Ct. at 1833; Johnson v. United States, 520 U.S. 461, 468, 117 S.Ct. 1544, 1549, 137 L.Ed.2d 718 (1997), and pointedly a breach of a plea agreement in violation of Santo-bello was not included.
Nor is it plausible that the Supreme Court would now decide to expand the class of structural errors, and wall off over *471ninety percent of state criminal convictions from harmless-error analysis on habeas review, particularly since pleas are not likely to concern cases involving innocent defendants. The majority retorts that no far-reaching precedent is at stake because state prisoners who challenge their guilty pleas may face harmless error for claims other than an alleged breach of a plea agreement. But what viable constitutional claims besides breach of a plea agreement are available to a habeas petitioner who pleaded guilty in state court? In any event, the majority cannot obscure the impact of barring harmless-error analysis in habeas review of plea agreements by pointing out that the doctrine might apply to some other claims. The fact remains that over ninety percent of defendants enter guilty pleas, and as a result barring harmless-error analysis from habeas review of alleged breaches of plea agreements will have a much bigger impact than barring harmless-error analysis from any rule affecting trials.
Removing breaches of plea agreements from harmless error may make sense on direct review, where the relevant evidence of the defendant’s guilt has not grown as stale, and where comity and federalism are not at stake, but not so for habeas review. By the time a federal court considers a habeas petition, victims who want to get on with their lives may no longer be willing to testify at sentencing, and if the plea is vacated, evidence may have disappeared or grown stale, making it harder for the state to prove what was once an easy case. And regardless of whether the plea is vacated or resentencing ordered, granting relief forces a direct intrusion on state courts’ authority even though the outcome of the state proceeding was not affected.
Finality serves important interests and is most compelling when there was no harm from the alleged error. The majority’s opinion reaches the wrong result in this case and, given the vast number of pleas in state court, creates precedent that will multiply that error many times in future cases. I dissent.
. The majority states that the parties "have not raised, much less briefed the issue” of harmless error. Majority Op. at 463. But the Commonwealth did maintain at oral argument that any putative error was harmless, and in any event we have discretion to consider harmless error sua sponte. See, e.g., United States v. Faulks, 201 F.3d 208, 213 (3d Cir.2000); United States v. McLaughlin, 126 F.3d 130, 135 (3d Cir.1997); United States v. Rose, 104 F.3d 1408, 1414 (1st Cir.1997); Horsley v. Alabama, 45 F.3d 1486, 1492 n. 10 (11th Cir.1995); United States v. Langston, 970 F.2d 692, 704 n. 9 (10th Cir.1992); Lufkins v. Leapley, 965 F.2d 1477, 1481 (8th Cir.1992); United States v. Pryce, 938 F.2d 1343, 1348 (D.C.Cir.1991); United States v. Giovannetti, 928 F.2d 225, 227 (7th Cir.1991).