OPINION OF THE COURT
WALCZAK, Judge:In accordance with his pleas, appellant was found guilty by a military judge sitting as a general court-martial of attempted espionage (two specifications), communicating with the enemy, and espionage (two specifications), in violation of Articles 80, 104, and 106a, Uniform Code of Military Justice, 10 U.S.C. §§ 880, 904, and 906a (1982) [hereinafter UCMJ], Appellant was sentenced to a dishonorable discharge, confinement for thirty-four years, forfeiture of all pay and allowances, and reduction to Private El. The convening authority, in accordance with a pretrial agreement, reduced the confinement to nineteen years, but otherwise approved the sentence.
In a combination of assignments of error, supplemental assignments of error, and issues personally raised by appellant, he asserts that: (1) he is entitled to a new pretrial advice; (2) that the staff judge advocate erred in not serving his post-trial recommendation on substitute defense counsel when appellant alleged his counsel were ineffective; (3) that his court-martial was without jurisdiction; (4) that his plea of guilty to espionage was improvident; (5) that his civilian and military defense counsel were ineffective; and (6) that his pretrial agreement should be declared void as against public policy.
We disagree and affirm.
I.
FACTS
Appellant came under investigation in December 1990, after U.S. Army intelligence personnel received information indicating that he had contacted representatives of the governments of Iraq and Jordan. Earlier in November 1990, appellant and his unit, the 2d Battalion, 29th Field Artillery, 8th Infantry Division, (Mechanized), were notified of their future deployment to Saudi Arabia to support Operation Desert Shield.
Acting on this information, a U.S. undercover intelligence agent, posing as a representative of the Jordanian government, contacted appellant and requested a meeting. Appellant reaffirmed his desire to sell sensitive military information and equipment and provided the agent with a Uniformed Services Identification and Privileges card and expressed a willingness to provide more identification cards to the agent and work with the government of Jordan. During the meeting, appellant detailed his previous contacts with representatives of the governments of Iraq and Jordan. He related how, in return for money, he provided a Jordanian agent with sensitive information concerning the deployment of his unit to Saudi Arabia, and transferred items of U.S. Army chemical protective equipment, and samples of U.S. Army field rations, along with other information not authorized for such transfer.
Prior to appellant’s meeting with the undercover U.S. intelligence officer, he met with representatives of Jordan and Iraq on five occasions. During the period of November to December 1990, appellant delivered to the Jordanian representative a nuclear, biological, and chemical (NBC) protective suit, NBC boots, NBC gloves, decontamination gear, and two NBC detection kits. He also provided information concerning the deployment of his battalion for Operation Desert Shield, a telephone roster for his unit’s rear detachment, and three Meals Ready to Eat (field rations) in exchange for 1700 Deutsche Marks.
Later, at a second meeting with the U.S. undercover agent, appellant transferred items of NBC equipment, documents relating to Desert Shield/Desert Storm, and a map of the Soviet Military Liaison Mission restricted areas. When appellant was given 500 Deutsche Marks for these items, he was arrested by U.S. authorities.
II.
Pretrial Advice
Before this court, appellant asserts that he is entitled to a new pretrial advice and *649trial because the staff judge advocate’s pretrial advice referenced appellant’s race and thereby violated equal protection guarantees. We find this assertion is without merit.
Regarding appellant’s first assignment of error, we agree that reference to race may be inappropriate for inclusion in court-martial records. See United States v. Brice, 33 M.J. 176 (C.M.A.1991) (summary disposition); United States v. Brannon, 33 M.J. 179 (C.M.A.1991) (interlocutory order). We find, however, that the error is harmless. See United States v. Broussard, 35 M.J. 665 (A.C.M.R.1992); United States v. Whitfield, 35 M.J. 535 (A.C.M.R.1992).
III.
Service of Staff Judge Advocate Post-Trial Recommendation
Next, appellant claims that the staff judge advocate erred by failing to serve his post-trial recommendation on a substitute trial defense counsel after appellant alleged that his trial defense counsel were ineffective. Again, we disagree.
On 9 October 1991, subsequent to appellant’s trial, before review and action by the convening authority, the acting staff judge advocate served his post-trial recommendation on appellant and his civilian defense counsel. On 11 October 1991, appellant’s civilian defense counsel submitted clemency matters on appellant’s behalf for consideration by the convening authority. Unbeknownst to appellant’s civilian and military defense counsel, on 14 October 1991, appellant wrote the convening authority a letter raising a number of issues. One issue questioned the effectiveness of his two defense counsel. On 27 November 1991, the acting staff judge advocate presented to the convening authority for his consideration, both appellant’s 14 October letter and the civilian defense counsel’s 11 October clemency matters. On 27 November 1991, the convening authority approved the sentence, but reduced the confinement in accordance with the pretrial agreement.
On 9 October 1991, when the acting staff judge advocate served his post-trial recommendation on appellant and appellant’s civilian defense counsel, and on 11 October, when appellant’s civilian defense counsel prepared clemency matters, no allegation of inadequacy of counsel had been raised. The concerns raised in appellant’s letter of 14 October regarding counsel were not known. In United States v. Clark, 22 M.J. 708 (A.C.M.R.1986), petition denied, 24 M.J. 45 (C.M.A.1987), this court reasoned under similar facts that it is not error for a staff judge advocate to serve his post-trial recommendation on a defense counsel when at the time of service no assertion of inadequacy of defense counsel has been raised. The court explained:
The primary reason for not allowing the trial defense counsel to act on behalf of his client when his trial performance has been attacked is because the defense counsel’s interest in defending his reputation for competence conflicts with his interest in representing his client on appeal. United States v. Stith, [5 M.J. 879 (A.C.M.R.1978), petition denied, 7 M.J. 270 (C.M.R.1979) ].
Clark, 22 M.J. at 710.
Accordingly, the purpose of the rule to arrange for and serve the staff judge advocate’s post-trial recommendation on substitute counsel was not present in the instant case. Appellant’s two defense counsel became aware of the challenge to their performance after the civilian counsel had responded. The civilian defense counsel was free of any competing interests when he prepared his response. Therefore, we hold that the acting staff judge advocate did not err by serving the recommendation on appellant’s civilian defense counsel.
IV.
The Military Judge
Appellant next asserts that his court-martial is without jurisdiction on two grounds, claiming that the military judge was appointed in violation of the Appointment Clause of the United States Constitution and that the military judge was not judicially independent because he lacked a *650fixed term of office. We find these assertions without merit. See United States v. Weiss, 36 M.J. 224 (C.M.A.1992); United States v. Graf, 35 M.J. 450 (C.M.A.1992).
V.
The Providence Inquiry
Appellant next claims that the military judge erred in accepting his plea of guilty to espionage when, during the providence inquiry, appellant raised matters and made statements that were wholly inconsistent with guilt. He claims these inconsistencies were never resolved. We hold that, if there were any inconsistencies, they did not render appellant’s pleas improvident.
Appellant complains that the military judge should have rejected his pleas due to purported inconsistencies concerning his intent or reason to believe that the information and equipment he passed to the enemy would be used to the injury of the United States or to the advantage of a foreign nation. The evidence of record clearly does not support that claim. First, we note that under Article 106a, UCMJ, an accused can be convicted of espionage if he intends to harm the United States or has reason to believe that his conduct will harm the United States. Although appellant, during the providence inquiry, stated he hoped and wished that his conduct would not injure the United States, he consistently admitted and stated that he had reason to believe and specifically intended that his actions would injure the United States and benefit its enemies.
Appellant next argues that this court should negate his plea because the items he provided to the Jordanian and Iraqi representatives and the undercover U.S. intelligence agent could “be found in any place.” To be convicted of espionage, the information or documents passed need not be of the type requiring security classification, but the “gravamen of the offense is the mens rea with which the accused has acted; not the impact or effect of the act itself.” United States v. Richardson, 30 M.J. 1239, 1244 (A.C.M.R.1990).
Accordingly, an accused can be convicted of violating Article 106a by passing unclassified information. United States v. Richardson, 33 M.J. 127 (C.M.A.1991) rev’g in part, 30 M.J. 1239 (A.C.M.R.1990). In appellant’s case, he testified under oath during the providence inquiry to the necessary mens rea that the items delivered were to the advantage of a foreign nation and that he had reason to believe that the items delivered would be used to the injury of the United States.
Additionally, while some items1 passed by appellant may be items accessible to the public, other items, such as the identification cards, the map of the Soviet Military Liaison Mission restricted areas, and certain NBC items are clearly not. Appellant recognized the restricted availability of these items when he testified that the information “was not lawfully accessible to the public.” Therefore, we find appellant’s assertion of error without merit.
VI.
Ineffective Assistance of Counsel
Raised as a supplemental assignment of error and pursuant to United States v. Grostefon, 12 M.J. 431 (C.M.A.1982), appellant personally asserts that his military and civilian trial defense counsel were ineffective. He argues that his counsel failed to interview witnesses, failed to raise possible defenses, provided faulty advice to appellant to waive the Article 32(b), UCMJ, hearing and public trial, and failed to assist appellant in fully and adequately exercising his post-trial rights. In response to these allegations, both appellant’s military and civilian defense counsel have provided this court with affidavits that are detailed, informative, and credible. We have considered the effectiveness of both counsel and concluded that appellant was provided effective representation throughout the pretrial, trial, and post-trial proceedings. Applying the standards set forth in Strickland v. Washington, 466 U.S. 668, 104 S.Ct. 2052, 80 L.Ed.2d 674 (1984), we con-*651elude that both counsel’s performance was effective.
VII.
Public Trial
Lastly, appellant claims that because his pretrial agreement provided for waiver of a public trial, it should be declared void as against public policy. We disagree.
Included in the defense-initiated pretrial agreement is a provision that states:
I will not object to closing the trial proceedings to the public under Military Rule of Evidence 505 and 506 for those portions of the trial that may involve classified or sensitive matters, to include confidential matters.
Now, on appeal, appellant challenges the inclusion of such a provision in his pretrial agreement as being against public policy. It is settled law that the right to a public trial is not absolute and an accused can waive the right to a public trial. United States v. Hershey, 20 M.J. 433, 437 (C.M.A.1985), cert. denied, 474 U.S. 1062, 106 S.Ct. 809, 88 L.Ed.2d 784 (1986), citing Singer v. United States, 380 U.S. 24, 85 S.Ct. 783, 13 L.Ed.2d 630 (1965). The essence of a pretrial agreement is that an accused waives his constitutional right to a trial to determine his guilt. Manual for Courts-Martial, United States, 1984, Rule for Courts-Martial 705(c)(1)(B) [hereinafter R.C.M.]. And an accused and the government are free to enter into pretrial agreements that require the accused to waive certain rights and proceedings if in accordance with R.C.M. 705(c)(1) and (2). We do not find inclusion of this provision to be against public policy.
The issue, however, is moot in appellant’s case, because the court-martial was never closed to the public. Accordingly, this assignment of error is also without merit.
During oral argument before this court, appellant for the first time asserted that he was effectively denied a public trial, in that certain individuals were excluded from the courtroom. Specifically, he asserted that his wife and a noncommissioned officer from his unit were told not to attend his trial. Subsequently, government and defense appellate counsel submitted affidavits from the trial defense counsel, appellant’s wife, and a prospective spectator on this issue. In his affidavit, appellant’s military trial defense counsel states that the trial was never closed, and that members of the public were present. We also note that appellant’s wife was told not to attend her husband’s court-martial by his defense counsel, based on tactical considerations. The affidavit from the prospective spectator states that he was told by two people, neither of which are identified as court personnel, that he could not attend appellant’s trial because classified information would be disclosed. We have carefully examined these affidavits and the entire record and find that the issue of government exclusion of spectators to appellant’s trial is not raised. Even assuming that a portion of the public was excluded from appellant’s trial, thereby infringing upon the constitutional right of the public to attend courts-martial, we find no prejudice to a substantial right of appellant. Cf. United States v. Story, 35 M.J. 677 (A.C.M.R.1992); United States v. Czarnecki, 10 M.J. 570 (A.F.C.M.R.1980). Accordingly, we reject appellant’s latest assertion.
We have carefully considered the other issues personally raised by appellant and find them without merit.
The findings of guilty and the sentence are affirmed.
Judge BAKER and Judge JOHNSTON concur.. We recognize that Meals Ready to Eat may be purchased commercially.