
675 F.3d 1204 (2012)
UNITED STATES of America, Plaintiff-Appellee,
v.
Jose Luis MANZO, Defendant-Appellant.
United States of America, Plaintiff-Appellee,
v.
Jose Luis Manzo, Defendant-Appellant.
United States of America, Plaintiff-Appellee,
v.
Jose Luis Manzo, Defendant-Appellant.
Nos. 10-35848, 10-35849, 10-35871.
United States Court of Appeals, Ninth Circuit.
Argued and Submitted February 10, 2012.
Filed April 5, 2012.
*1207 Matthew Campbell, Assistant Federal Public Defender, Spokane, WA, for the defendant-appellant.
Shawn N. Anderson, Assistant United States Attorney, Yakima, WA, for the plaintiff-appellee.
Before: MARY M. SCHROEDER, ARTHUR L. ALARCÓN, and RONALD M. GOULD, Circuit Judges.

OPINION
GOULD, Circuit Judge:
Jose Luis Manzo ("Manzo") appeals the district court's denial of his 28 U.S.C. § 2255 motion to vacate the sentences he received after (1) his jury conviction of conspiracy to possess with intent to manufacture a controlled substance in violation of 21 U.S.C. §§ 841(c), 846; (2) his guilty plea to distribution of a controlled substance in violation of 21 U.S.C. § 841(a)(1); and (3) his guilty plea to a supervised release violation. We have jurisdiction under 28 U.S.C. §§ 1291, 2253, and we reverse and remand to the district court for proceedings consistent with this opinion.

I
Manzo was charged, inter alia, with conspiracy to possess pseudoephedrine with intent to manufacture methamphetamine ("the manufacturing case") and with distribution of 50 or more grams of actual methamphetamine ("the distribution case"). Manzo was also charged with a supervised release violation. Manzo went to trial in the manufacturing case, the jury found him guilty, and sentencing was continued pending resolution of the charges in the distribution case.
Pursuant to a plea agreement, Manzo pleaded guilty in the distribution case. By accepting the plea agreement, Manzo agreed, inter alia, to waive his right to direct appeal or collateral attack of his convictions in both the manufacturing case and the distribution case, except to assert ineffective assistance of counsel and to appeal incorrect Guidelines calculations and any sentence flowing from such a mistake. The government agreed, inter alia: (1) that it would not file more charges against Manzo; (2) that a Sentencing Guidelines base offense level of 34 applied to Manzo's criminal conduct in the distribution case; (3) that the government would recommend a three-level downward adjustment upon Manzo's acceptance of responsibility, adjusting the applicable offense level to 31; and (4) that the government would recommend that the sentence imposed in the distribution case run concurrently to the sentence imposed in the manufacturing case.
After accepting Manzo's guilty plea, the district court set a date on which, pending the presentence report ("PSR"), sentence would be imposed in the manufacturing case, the distribution case, and the supervised release violation. The PSR noted that under U.S.S.G. § 3D1.2(d), "[w]hen the offense level is determined largely on the basis of the total amount of harm or loss, the quantity of a substance involved, or some other measure of aggregate harm," counts are considered to involve "substantially the same harm" and are to be grouped into a single group. Accordingly, the PSR grouped the manufacturing case and the distribution case together, and for the purpose of determining a single *1208 quantity of the two substances involved in Manzo's conduct (pseudoephedrine and methamphetamine), converted each into the comparable amount of marijuana per the Drug Equivalency Tables and added the converted amounts together. This calculation yielded an offense level of 38, not a level of 34 to which the parties had agreed in the plea agreement for the distribution case. The PSR also recommended no downward departure for acceptance of responsibility because Manzo did not meet the criteria with respect to the manufacturing case in which he had gone to trial. In addition, the PSR determined that Manzo's prior criminal conduct placed him in a Criminal History Category of III, which, along with an offense level of 38, yielded a Guidelines range of 292-365 months with respect to the distribution case sentence, well beyond the 135-168 months that Manzo apparently had expected when he entered his plea bargain on that count.
Manzo, through his attorney, filed objections to the PSR, but Manzo's attorney did not advise Manzo to seek to withdraw from the plea agreement in light of its failure to take into account the applicability of the grouping provision. The district court overruled Manzo's objections, concluded that the PSR correctly grouped the offenses and that a base offense level of 38 applied to Manzo.
The government agreed with the district court that a base offense level of 38 was correct based on the grouping provision and then proceeded to recommend that Manzo be sentenced within the range of 292-365 months that it required, instead of recommending a base offense level of 34, with a corresponding guidelines range of 135-168 months.[1] With respect to the downward departure based on early acceptance of responsibility, the government noted that Manzo took responsibility for his conduct involved in the distribution case, but the government did not affirmatively recommend, as agreed, that the district court apply a three-level downward departure as to Manzo's distribution case sentence. Manzo did not argue during the sentencing proceedings and hearing that in making those recommendations, the government breached the plea agreement. After hearing from both sides, the district court sentenced Manzo to 292 months in the distribution case, 240 months, the statutory maximum, in the manufacturing case, and 16 months for the supervised release violation, all to run concurrently. On direct appeal, we affirmed the sentence, and concluded, under plain error review, that the government did not breach the plea agreement. See United States v. Manzo, 337 Fed.Appx. 642 (9th Cir.2009) (Manzo I).[2]
*1209 Manzo then filed in the district court a § 2255 motion to vacate the sentence imposed, asserting ineffective assistance of counsel and breach of the plea agreement. Manzo argued that his attorney gave him ineffective assistance of counsel by not anticipating that the offenses would be grouped for sentencing, and by not advising Manzo to withdraw from the plea agreement once it was clear that the offenses would be grouped for sentencing. The district court rejected this argument, concluding that Manzo did not establish constitutionally deficient performance as required under Strickland v. Washington, 466 U.S. 668, 104 S.Ct. 2052, 80 L.Ed.2d 674 (1984) because sentencing miscalculations do not rise to the level of constitutionally deficient performance. Having reached this conclusion, the district court did not address the issue of prejudice. Manzo also argued that the government breached the plea agreement because it recommended neither a base offense level of 34 nor a downward departure for acceptance of responsibility, but the district court rejected this claim concluding that the government performed as promised. Manzo appeals the district court's decision on both grounds, ineffective assistance of counsel and breach of the plea agreement by the government.

II
We review de novo both a district court's denial of habeas relief, Lopez v. Schriro, 491 F.3d 1029, 1036 (9th Cir.2007), and the effectiveness of counsel, United States v. Labrada-Bustamante, 428 F.3d 1252, 1260 (9th Cir.2005). There is some confusion as to what the standard of review is for alleged violations of plea agreements. United States v. Transfiguracion, 442 F.3d 1222, 1227 (9th Cir.2006); see also United States v. Mondragon, 228 F.3d 978, 980 (9th Cir.2000). Manzo, however, did not raise the issue of breach of the plea agreement before the sentencing court. Accordingly, we review Manzo's plea agreement breach claim for plain error. United States v. Whitney, 673 F.3d 965, 970-71 (9th Cir.2012). Plain error is "(1) error, (2) that is plain, and (3) that affect[s] substantial rights .... If all three conditions are met, [we] may then exercise [our] discretion to notice a forfeited error, but only if (4) the error seriously affect[s] the fairness, integrity, or public reputation of judicial proceedings." United States v. Cotton, 535 U.S. 625, 631, 122 S.Ct. 1781, 152 L.Ed.2d 860 (2002) (internal citations and quotations marks omitted).

III
We address the appealed claims of ineffective assistance of counsel and of plea agreement breach in turn.

A
Manzo argues that his counsel gave him ineffective assistance of counsel. To establish ineffective assistance of counsel, Manzo must show "both that his counsel's performance was deficient and that the deficient performance prejudiced his defense." Iaea v. Sunn, 800 F.2d 861, 864 (9th Cir.1986) (citing Strickland, 466 U.S. at 687, 104 S.Ct. 2052). We agree with Manzo that his counsel's failure to anticipate that the offenses would be grouped for sentencing purposes and then advise Manzo to move to withdraw his agreement to plead guilty was constitutionally deficient. This was not a minor technical error, but rather it had major impact on the calculation of the discretionary Sentencing Guidelines. We have previously stated that, "[t]hough a mere inaccurate prediction, standing alone, would not constitute ineffective assistance, the gross mischaracterization of the likely outcome ..., combined with the erroneous advice on the possible effects of going to trial, falls below the level of competence required of defense *1210 attorneys." Id. at 865 (citations omitted). Here, Manzo waived critical rights without the benefit of understanding the impact that grouping would have on his sentence. It is hard to avoid the conclusion that because of the grouping of offenses for sentencing purposes, Manzo did not get the benefit of the bargain that led him to plead guilty in the distribution case and forego appeal rights in the manufacturing case. We conclude that his counsel's failure to anticipate the applicability of the grouping provision to Manzo's sentencing and failure then to advise Manzo to move to withdraw from the plea agreement was constitutionally deficient. Id. at 864-65 (concluding that there was ineffective assistance of counsel where counsel told Iaea that if he accepted a plea agreement, he would likely be sentenced to probation for his offenses when in fact he was sentenced to a life term, a separate 25-year term, and a separate 10-year term).
The question remains, however, whether Manzo was prejudiced by his counsel's performance. The effects of grouping on the offense level and on acceptance of responsibility require assessment in a prejudice analysis of whether if correctly advised Manzo would have pleaded guilty anyway and declined the chance to withdraw his plea and go to trial. The record does not contain the historical views of defense counsel or of Manzo on these points. The district court did not address this issue of prejudice, and we decline to engage in that analysis in the first instance. Accordingly, we REVERSE the district court's denial of Manzo's § 2255 motion and REMAND the matter to the district court with instructions to consider whether Manzo was prejudiced by his counsel's performance.

B
Manzo contends that the government breached its plea agreement with respect to the distribution sentence by merely agreeing before the district court that in light of the grouping, a base offense level of 38 was a correct calculation without recommending a base offense level of 34, per the agreement's terms, and by not recommending a downward departure for Manzo's acceptance of responsibility. The government concedes that like Manzo's attorney, it did not contemplate that the offenses would be grouped under the Sentencing Guidelines. The parties acknowledge then that there was a mutual mistake as to the applicability of the grouping provision to Manzo's convictions. The government argues that it is excused from performance of its contractual obligations because of this mutual mistake of law; namely that because the plea agreement did not contemplate that the sentences would be subject to grouping, it was appropriate for the government not to perform as expressly promised.
"We construe a plea agreement as a contract between the prosecutor and the defendant." United States v. Gonzalez-Melchor, 648 F.3d 959, 963 (9th Cir. 2011). "[W]hen a plea rests in any significant degree on a promise or agreement of the prosecutor, so that it can be said to be part of the inducement or consideration, such promise must be fulfilled." Santobello v. New York, 404 U.S. 257, 262, 92 S.Ct. 495, 30 L.Ed.2d 427 (1971). We have previously declined to excuse the government from its contractual obligations under a plea agreement even where the plea agreement is premised on a mutual mistake of law. See Transfiguracion, 442 F.3d at 1229 ("The inability to rescind a plea agreement based on a mutual mistake of law applies to criminal defendants as well as to the government."). That both the government and Manzo's counsel did not consider the application of the Sentencing Guidelines grouping provision does not "void an otherwise valid plea agreement," *1211 and does not relieve the government of performing as promised. Id. at 1230.
Here, although the manufacturing conviction and the distribution conviction were grouped for the purpose of sentencing, separate sentences were imposed as to each conviction. With respect to the distribution case sentence, the government had agreed that a base offense level of 34 would apply to Manzo's sentence and promised to recommend a 3-level downward departure upon Manzo's acceptance of responsibility. At the sentencing hearing, however, the government did neither and so breached the express terms of the plea agreement.[3]
First, with respect to the base offense level, at this hearing the government agreed that a base offense level of 38 was correct based on the grouping provision and then recommended that Manzo be sentenced within that range instead of recommending a base offense level of 34. The government must be truthful with the district court as to the legal import of the grouping provision on the correct guidelines calculation. United States v. Maldonado, 215 F.3d 1046, 1052 (9th Cir.2000) ("We conclude that a plea agreement does not bar the government from honestly answering the district court's questions."). This obligation, however, did not preclude the government from answering the district *1212 court truthfully and then performing as promised under the plea agreement, namely to recommend that the district court, in its discretion, sentence Manzo in accordance with the promised figure, a base offense level of 34. Id. (concluding there was no breach of the plea agreement where "[a]t the sentencing hearing and in its written objections the government acknowledged its calculation error and stated that it stood by its plea agreement to recommend a base offense level of 32" even though a level of 34 was the correct calculation).
Second, with respect to acceptance of responsibility, although the government said that Manzo took responsibility for the conduct involved in the distribution case, the government did not affirmatively recommend, as agreed, that the district court give a three-level downward departure to Manzo's distribution case sentence. See Whitney, 673 F.3d at 972 ("Although the prosecutor uttered the requisite words by recommending a sentence at the low-end of the guidelines, her additional statements constituted an argument for a higher sentence."). Instead, the government advocated for no adjustment based on Manzo's acceptance of responsibility because he went to trial in the manufacturing case and argued for a sentence far above one within the agreed-upon range in the plea agreement. See id. at 971 (concluding that the government breached the plea agreement where it "implicitly argu[ed] for a sentence greater than the terms of the plea agreement specified that the prosecution would recommend"). For example, the government concluded its statements to the district court by saying, "[Manzo's] the one that got himself there. I'd ask that the guideline range sentence [as calculated in the PSR, which recommended no downward departure for acceptance of responsibility] be imposed." Accordingly, although the circumstances involving the misapprehended requirement for grouping of offenses is mitigating, we conclude that the government breached the express terms of its plea agreement with Manzo. He did not get what he bargained for in the plea agreement. This breach in our view would negatively impair the integrity and reputation of judicial proceedings. It might further make it harder for the government to reach plea agreements in the future.
The issue of breach is clouded and mitigated by the fact that the plea agreement was underinclusive in scope and affirmatively did not anticipate the grouping of offenses for sentencing that would be required. There was certainly no intentional breach, and the breach occurred only because the parties hadn't anticipated grouping. But in any event, Manzo did not receive the benefit of his bargain, namely "the presentation of a `united front' to the court," through no fault of his own. United States v. Alcala-Sanchez, 666 F.3d 571, 575 (9th Cir.2012); see also In re Vasquez-Ramirez, 443 F.3d 692, 697 (9th Cir.2006) ("If the court accepts the agreement and thus the Government's promised performance, then the contemplated agreement is complete and the defendant gets the benefit of his bargain."). Because of both the government's and Manzo's counsel's mistake of law, Manzo, at the time he entered into the plea agreement, had the reasonable expectation that the government would at least recommend the downward departure for acceptance of responsibility. See United States v. De la Fuente, 8 F.3d 1333, 1337 n. 8 (9th Cir.1993) ("[I]t is the defendant's understanding at the time of the plea that controls."); United States v. Kamer, 781 F.2d 1380, 1387 (9th Cir.1986) ("In determining whether a plea agreement has been broken, courts look to what was reasonably understood by the defendant when he entered his plea of guilty.") (internal quotation marks omitted). *1213 It would be manifestly unjust to hold Manzo to the terms of the plea agreement, notwithstanding the unanticipated effects of the grouping provision, yet to excuse the government from performing per the express terms. See Whitney, 673 F.3d at 974 ("Ignoring the government's failure to adhere to this promise in the face of [the defendant's] own compliance would substantially challenge notions of fairness and integrity within the judiciary."). Our interest then in preserving the integrity of the plea bargaining process along with principles of equity support our decision to provide relief for Manzo. See Santobello, 404 U.S. at 260, 92 S.Ct. 495 ("The disposition of criminal charges by... `plea bargaining,' is an essential component of the administration of justice."); see also Morales v. Trans World Airlines, Inc., 504 U.S. 374, 381, 112 S.Ct. 2031, 119 L.Ed.2d 157 (1992) (citation and internal quotation marks omitted) (explaining that equitable remedies are traditionally available where no legal remedy is available). The plea agreement breach and sentencing on a basis so different from Manzo's plea agreement was plain error that affected Manzo's substantial rights.

IV
We REVERSE the district court's denial of Manzo's § 2255 motion and REMAND the matter to the district court with instructions to consider, for the purposes of the ineffective assistance of counsel claim, whether Manzo was prejudiced by his counsel's performance. If so, Manzo's distribution conviction and sentence should be vacated, and if he wants to undertake the attendant risks,[4] he may go to trial on the distribution offense, and may appeal the manufacturing offense trial conviction, an appeal that was foreclosed by the plea agreement. If not, we REMAND for resentencing before a different district judge and order the government's specific performance of the terms of the plea agreement. See Mondragon, 228 F.3d at 981 (reasoning that remand to a different judge does not suggest the fault rests with the sentencing judge, rather the fault rests with the prosecutor, and the Supreme Court requires remand to a different judge).
REVERSED and REMANDED.
NOTES
[1]  The government stated at the sentencing hearing:

Is there a reason for me to recommend anything less than [the PSR's recalculated] range? And I could not, based on his conduct, based on, again, the breadth of his conduct, the stiff offenses that are provided for in the federal guidelines are absolutely appropriate to this type of defendant, to the conduct that he's engaged in, again, to the breadth, the scale of it. And if a guideline range sentence as set forth in the presentence report isn't appropriate for Mr. Manzo, then I wonder who it would be appropriate for.
[2]  On direct appeal, we affirmed the district court's determination from a preponderance of the evidence as to the quantity of pseudoephedrine involved in Manzo's conviction in the manufacturing case. Id. at 644. The district court pointed out that the jury found Manzo responsible for the amount of pseudoephedrine that the PSR used to calculate the base offense level. Accordingly, we reject Manzo's argument that the district court erred in the amount of pseudoephedrine it attributed to Manzo in sentencing.
[3]  We address Manzo's claim on the merits. On direct appeal, we summarily rejected Manzo's argument that the government breached the plea agreement. Manzo I, 337 Fed.Appx. at 642. In an unpublished decision, we simply stated: "Manzo also argues the government breached the plea agreement by failing to recommend a downward departure. Manzo neglected to raise this claim at the sentencing hearing, and no plain error occurred." Id. Having so decided, normally, the "law of the case" doctrine would bar us from reconsidering Manzo's breach claim here. See United States v. Scrivner, 189 F.3d 825, 827 (9th Cir.1999). "The `law of the case' doctrine provides that one panel of an appellate court will not as a general rule reconsider questions which another panel has decided on a prior appeal in the same case." Id. at 827 (internal quotation marks omitted); accord White v. United States, 371 F.3d 900, 902 (7th Cir.2004) ("Invoking the doctrine of the law of the case, the courts, including our court, forbid a prisoner to relitigate in a collateral proceeding an issue that was decided on his direct appeal."). However, "[a] court may depart from the law of the case if ... the first decision was clearly erroneous." See Scrivner, 189 F.3d at 827 (citing United States v. Alexander, 106 F.3d 874, 876 (9th Cir.1997)); see also United States v. Van Alstyne, 584 F.3d 803, 813 (9th Cir.2009) (stating that the law of the case doctrine is "not an inexorable command"); White, 371 F.3d at 903 (stating that the law of the case "must be followed ... on a later appeal ... unless ... the prior decision was clearly erroneous and would work manifest injustice.") (internal quotation marks and citation omitted); United States v. Maybusher, 735 F.2d 366, 370 (9th Cir.1984) (stating that the law of the case doctrine "expresses only the practice of courts generally to refuse to reopen questions formerly decided, and is not a limitation of their power."). The summary disposition by our court's prior panel in one conclusory sentence gives us no hint of the reasoning supporting that decision. By contrast, our review of the record, described below, supports our conclusion that there was a breach of the plea agreement by the government and that the previous and summary conclusion to the contrary in Manzo I was clear error.

Alternatively, the government does not argue that the law of the case doctrine precludes Manzo from asserting breach of the plea agreement on this appeal of the district court's denial of his motion under § 2255. Accordingly, we deem the issue waived. See United States v. Guess, 203 F.3d 1143, 1145-46 (9th Cir.2000) (concluding that the government waived the issue of procedural default in a § 2255 motion when it did not raise the issue before the district court); see also 5 Charles Wright & Arthur R. Miller, Federal Practice and Procedure § 1278 (3d ed. 1998) ("It is a frequently stated proposition of virtually universal acceptance by the federal courts that a failure to plead an affirmative defense as required by Federal Rule 8(c) results in the waiver of that defense and its exclusion from the case.").
[4]  Absent a plea agreement, the government may charge additional offenses beyond those entered in the plea and that in itself would not be vindictive prosecution. See United States v. Kent, 649 F.3d 906, 913-14 (9th Cir.2011) (concluding that there was no presumption of vindictive prosecution where the government decided to file an additional charge after Kent decided to enter an unconditional plea instead of to cooperate).
