*611OPINION OF THE COURT
FOREMAN, Judge:The appellant was charged with being an accessory after the fact, receiving stolen property, drunk and disorderly conduct, attempted arson, assault on a superior non-commissioned officer, disrespect toward a noncommissioned officer, use of provoking language, arson, and assault on a military policeman, in violation of Articles 78, 134, 80, 91, 117, 126 and 128, Uniform Code of Military Justice, 10 U.S.C. §§ 878, 934, 880, 891, 917, 926, and 928 (1976), respectively.
At a special court-martial, the appellant pleaded guilty to all charges and specifications except the offense of being an accessory after the fact. His pleas were entered pursuant to a pretrial agreement, in which the convening authority agreed to suspend any confinement adjudged in excess of 75 days in return for the appellant’s pleas of guilty.
The military judge conducted a detailed inquiry into the terms and conditions set out in the appellant’s offer to plead guilty. He obtained assurances from both sides that the document containing the offer to plead guilty contained all the terms and conditions of the agreement. Since the trial was by a military judge sitting alone, he did not examine the document containing the agreed maximum sentence (hereinafter referred to as the “quantum” portion of the agreement) prior to announcing the sentence.
The military judge sentenced the appellant to a bad-conduct discharge, confinement at hard labor for 60 days, and forfeiture of $299.00 pay per month for six months. After announcing the sentence, the military judge examined the quantum portion of the agreement and informed the appellant that the convening authority had no obligations under the agreement, since the adjudged sentence was less severe than the agreed maximum sentence.1 He did not explain or inquire into a post-trial misconduct provision contained in the quantum portion of the agreement, which was then before him for the first time.2 Neither side had disclosed to the military judge that the quantum portion contained a post-trial misconduct provision.
The Court of Military Appeals has mandated that the military judge inquire into all terms and conditions of a pretrial agreement. United States v. Green, 1 M.J. 453 (C.M.A. 1976). Failure to conduct a full plea bargain inquiry is regarded as a matter affecting the providence of the guilty plea. The Court has held further that substantial compliance with the Green requirement is insufficient; “full compliance” is required. United States v. King, 3 M.J. 458 (C.M.A. 1977). Cf. United States v. Crowley, 3 M.J. 988 (A.C.M.R. 1977) (en banc), affirmed, 7 M.J. 336 (C.M.A. 1979) (substantial compliance sufficient if plea entered prior to King decision).
However, the failure of a military judge to inquire into an agreement does not automatically render a guilty plea improvident if it is due to the failure of counsel to *612disclose the existence of the agreement. Such a failure does not constitute judicial error, but rather counsel error. While the remedy mandated by King for judicial error is reversal, a breach of counsel’s obligation to his client or the court does not require reversal unless it rises to the magnitude of inadequate misrepresentation or materially affects the substantial rights of his client. United States v. Myles, 7 M.J. 132 (C.M.A. 1979).
The inquiry into the terms of the agreement normally precedes the acceptance of the plea of guilty, since an accused’s understanding of the terms of his pretrial agreement is essential to a provident plea of guilty. Accordingly, a military judge in a bench trial cannot be expected to inquire into a provision contained in the quantum portion of the agreement prior to accepting the plea of guilty, since he should not examine the quantum portion until after he has announced the sentence. United States v. Walters, 5 M.J. 829 (A.C.M.R. 1978), affirmed, 8 M.J. 95 (C.M.A. 1979).
Under the circumstances of this case, we hold that the military judge’s failure to inquire into the post-trial misconduct provision was not error. He could not inquire into a provision which was unknown to him. When the military judge first became aware of the provision, it was moot, since he already had announced a sentence less severe than the agreed maximum sentence. We do not believe that the Court of Military Appeals intended in Green and King to require a military judge to inquire into a provision which has become moot.3
Since we hold that this case involves counsel error rather than judicial error, we must test for specific prejudice. The appellant, while still in basic training, had informed his commander that he wanted out of the Army. When his commander told the appellant that he could not be discharged because he was not in trouble, the appellant intentionally misbehaved in order to obtain a discharge. At his trial, the appellant specifically requested the military judge to impose a bad-conduct discharge. Under the circumstances, we are certain that the appellant would have persisted in his pleas of guilty in order to obtain a discharge, albeit a bad-conduct discharge, even if the military judge had discovered and explained the post-trial misconduct provision prior to acceptance of the pleas. Accordingly, we are satisfied that the appellant was not prejudiced by the failure of counsel to disclose the post-trial misconduct provision prior to acceptance of the guilty pleas or by the failure of the military judge to inquire into the post-trial misconduct provision after announcement of the sentence.
We disagree with the appellant’s contention that the post-trial misconduct provision is void as a matter of law and public policy for the reasons stated in United States v. Thomas, 6 M.J. 573 (A.C.M.R. 1978), affirmed on other grounds, 8 M.J. 216 (C.M.A. 1980). Accord, United States v. Valadez, 10 M.J. 529 (A.C.M.R. 1980).
The findings of guilty and the sentence are affirmed.
Judge CLAUSE concurs.
. The convening authority reduced the period of confinement to seven days and approved the remainder of the adjudged sentence. The case is before this Court for mandatory review pursuant to Article 66, Uniform Code of Military Justice, 10 U.S.C. § 866 (1976).
. The format of the agreement followed the usual practice of executing the agreement in two separate documents. The first document contained the offer to plead guilty and lists the terms and conditions of the offer, but'did not specify the agreed maximum sentence. The second document contained the agreed maximum sentence. In this case the post-trial misconduct provision was in the latter document rather than its usual (and preferable) place in the offer to plead guilty. See United States v. Walters, 5 M.J. 829, 830 (A.C.M.R. 1978). In the post-trial misconduct provision, the appellant agreed that “should I commit any acts of misconduct cognizable under the Uniform Code of Military Justice between the time of entry of findings and the time that the Convening Authority takes action on the record of trial, the convening authority may consider this agreement null and void and may approve without suspension any sentence adjudged which he deems proper.”
. In United States v. Crowley, 3 M.J. 988 (A.C.M.R. 1977) (en banc), affirmed, 7 M.J. 336 (C.M.A. 1979), this Court held that the military judge was not required to inquire into a provision requiring the appellant to stipulate, because the government had not required a stipulation, making the provision moot. However, the military judge’s inquiry was defective because he failed to ask whether the agreement encompassed all the understandings of the parties and whether counsel agreed with his interpretation of the agreement. This Court inferred agreement of counsel with the military judge’s interpretation of the agreement from the absence of objection by either counsel, and obtained affidavits from counsel to establish the absence of sub rosa agreements. The Court of Military Appeals noted that the pleas were entered prior to the King decision and affirmed the conviction on the ground that there had been substantial compliance with Green. The Court of Military Appeals made no specific comment regarding the failure of the military judge to inquire into the agreement to stipulate.