ORDER
The panel has decided to withdraw the opinion filed November 5, 2007. The opinion is withdrawn and a substituted opinion is filed concurrently with this order.
With the filing of the substituted opinion, the panel has voted to deny the petition for rehearing and to reject the suggestion for rehearing en banc.
The full court has been advised of the suggestion for rehearing en banc, and no judge of the court has requested a vote on the suggestion for rehearing en banc. Fed. R.App. P. 35(b).
The petition for rehearing is denied and the suggestion for rehearing en banc is rejected. No further petitions for rehearing or rehearing en banc will be allowed.
OPINION
In this appeal we consider, among other matters, whether the district court’s imposition of a lifetime of supervised release was reasonable and whether the district court was required to articulate findings before imposing certain special conditions of supervised release pertaining to medication. Under the circumstances presented by this ease, we conclude that the term of supervised release imposed was reasonable, but that the district court should have articulated findings before imposing special conditions of release that would implicate a particularly significant liberty interest of the defendant. Therefore, we affirm in part, vacate the sentence in part, and remand for further proceedings.
*948 I.
In September of 2003, San Bernardino Sheriffs Department deputies discovered over 600 images and 20 videos of child pornography on Gordon Cope’s home computers, including “videos of sadistic and masochistic acts.” On March 10, 2006, Cope pled guilty to one count of possession of child pornography, in violation of 18 U.S.C. § 2252A(a)(5)(B). Cope entered his plea pursuant to a plea agreement with the government in which both parties stipulated to a total offense level of 28 under the United States Sentencing Guidelines, including numerous upward adjustments relating to the child pornography possession. The government conditionally agreed to seek the low end of the Guidelines range for incarceration, but made no agreement as to what term of supervised release it would seek. In return, Cope agreed to waive his statutory right to appeal “any sentence imposed by” the district court, provided certain requirements were met. Cope retained his right to appeal most of the special conditions of his supervised release.
Following the change of plea hearing, the probation office prepared, using the November 2002 Sentencing Guidelines, a presentence report (“PSR”) recommending a total offense level of 25 and a criminal history category of II. This would ordinarily result in an advisory Guidelines range of 63 to 78 months. However, Cope’s 1981 conviction for attempted sexual assault on a child triggered a statutory mandatory minimum sentence of 120 months under 18 U.S.C. § 2252A(b)(2). The PSR noted that the Guidelines range for supervised release was 2-3 years, but did not mention that the Guidelines contained a policy statement recommending the statutory maximum term of supervised release for those convicted of sex offenses. U.S.S.G. § 5D1.2(c) (Nov.2002). The statute in effect at the time of Cope’s offense, like the one in effect now, provided for a lifetime term of supervised release as the statutory maximum for crimes involving possession of child pornography. 18 U.S.C. § 3583(k) (2007); 18 U.S.C. § 3583(k) (2003). In response to the PSR, the government filed a sentencing memorandum recommending that Cope receive the maximum term of supervised release in accordance with the Guidelines policy statement. Cope filed a memorandum requesting a prison sentence of less than ten years and a term of supervised release of less than life. Cope specifically objected to any special condition of supervised release of which he had not been given notice.
The district court held a sentencing hearing on July 10, 2006. After hearing from the parties, the district court sentenced Cope — 58 years old at the time of sentencing — to 120 months in prison, the statutory minimum, and a lifetime term of supervised release. The district court explained that a three-year term of supervised release was not sufficient in light of Cope’s criminal history, particularly his guilty plea to attempted sexual assault on a child. Instead, the district court found that a lifetime term of supervised release was necessary based on the interest in
the protection of society that the government has referred to.... [T]he nature of the offense, the type of materials that were seized; and I think that the protection of society, particularly in instances of the protection of minors from this kind of offense, is a paramount concern, obviously, to the government, also to the court.
The district court also imposed a number of special conditions of supervised release, including a condition requiring Cope to participate in sex offender treatment. As part of that treatment, the district court imposed conditions requiring Cope to sub *949 mit to polygraph testing, penile plethysmo-graph testing, and Abel testing, and to take all prescribed medication. 1 Another condition prohibits Cope from possessing any materials “depicting and/or describing child pornography as defined in 18 United States Code section 2256, subdivision eight.” Although the district court notified the parties that it was considering a special condition requiring Cope to participate in sex offender treatment, the court made no mention, prior to its announcement of the sentence, sub-conditions relating to testing or medication. This timely appeal followed.
II.
We review a defendant’s sentence for reasonableness, considering whether the district court accurately calculated the Guidelines range and whether the sentence is reasonable in light of the 18 U.S.C. § 3553(a) factors.
United States v. Reina-Rodriguez,
III.
Cope argues it was unreasonable for the district court to sentence him to a lifetime term of supervised release. He also argues the district court did not adequately explain why the lifetime term was necessary. Before reaching the merits of this challenge, we must determine whether Cope waived his right to appeal this aspect of his sentence.
United States v. Michlin,
In reviewing a waiver of appeal, we first examine “the circumstances surrounding the signing and entry of the plea agreement to determine whether the defendant agreed to its terms knowingly and voluntarily.”
Baramdyka,
Next, we determine the scope of the waiver — whether the waiver precludes the defendant’s appeal — based on the language used in the plea agreement.
Id.
at 843. For the most part, we interpret plea agreements “ ‘using the ordinary rules of
*950
contract interpretation.’ ”
United States v. Transfiguracion,
Cope agreed to waive his right to appeal “any sentence imposed by the Court, and the manner in which the sentence is determined,” so long as
(a) the sentence is within the statutory maximum specified above and is constitutional, (b) the Court in determining the applicable guideline range does not depart upward in offense level or criminal history category and determines that the total offense level is 28 or below, and (c) the Court imposes a sentence: (1) within or below the range corresponding to the determined total offense level and criminal history category; or (2) at the statutory mandatory minimum.
The plea agreement also stated that a lifetime term of supervised release was the statutory maximum that could be imposed, and that the government “makes no agreement as to the term of supervised release to be imposed.” The plea agreement made clear that, as an exception to the general waiver of his appellate rights, Cope retained the right to appeal some of the conditions of his supervised release.
The length of Cope’s term of supervised release is part of his “sentence,” and is not a condition of his supervised release.
See Weber,
The prerequisites set forth in Cope’s waiver agreement will be met, and Cope’s appeal of the length of his term of supervised release is barred, if Cope’s sentence is (a) within the statutory maximum and is constitutional, (b) not based on an upward departure or an offense level above 28, and (c) is either within or below the Sentencing Guidelines range corresponding to Cope’s offense level and criminal history category or is at the statutory mandatory minimum. It is undisputed that Cope’s 120-month term of incarceration meets these requirements because it is at the statutory mandatory minimum for a defendant with a prior conviction relating to sexual abuse.
Accordingly, Cope’s ability to appeal the length of his supervised release must be based on the nonconformity of that term of supervised release with the stated requirements. Addressing each prerequisite in turn, we conclude that a lifetime term of supervised release is within the statutory maximum for a crime involving child pornography, the range of which is “any term of years or life.” 18 U.S.C. § 3583(k) (2003). 2 The second requirement is also met because the district court did not de *951 part upward. As for the third requirement, a lifetime term of supervised release is not at the statutory mandatory minimum, which would be “any term of years.” 18 U.S.C. § 3583(k) (2003). This means Cope’s appeal is barred only if his lifetime term is “within or below the range corresponding to the determined total offense level and criminal history category.”
As drafted, however, this provision cannot sensibly be applied to a term of supervised release. Under the Sentencing Guidelines, the offense level and criminal history category do not control the term of supervised release, as they do the term of imprisonment. Rather, the
type of offense
determines the length of the Guidelines range for the term of supervised release.
See
U.S.S.G. § 5D1.2(a) (Nov.2002) (specifying supervised release range for Class C felonies); 18 U.S.C. § 3559(a)(3) (Class C felony defined as a crime with a maximum term of imprisonment between 10 and 25 years); 18 U.S.C. § 2252A(b)(2) (2003) (maximum term for Cope’s crime is 20 years). This ambiguity in the waiver provision makes it impossible for us to determine whether the prerequisites for waiver have been met with regard to Cope’s term of supervised release. Because we “steadfastly” apply the rule that “any lack of clarity” in a plea agreement should be construed against the government as drafter,
Transfiguracion,
IY.
Having established that Cope has not waived his right to appeal his term of supervised release, we must determine whether it was reasonable for the district court to sentence Cope to a lifetime term of supervision following his eventual release from prison. The parties do not dispute that the district court accurately calculated the Guidelines range. The only issues on appeal are whether the district court adequately stated its reasons for imposing the lifetime term, 18 U.S.C. § 3553(c), and whether the lifetime term is reasonable in light of the § 3553(a) factors, id. § 3583(c). We answer both questions in the affirmative.
In this case, “[t]he record makes clear that the sentencing judge listened to each argument” regarding the length of Cope’s term of supervised release and “considered the supporting evidence.”
Rita v. United States,
551 U.S. -,
Next, we examine whether Cope’s lifetime term of supervised release was reasonable. The parties disagree as to whether we should review the length of a term of supervised release for reasonableness, the standard we use when reviewing sentences,
Reina-Rodriguez,
The district court’s statements, discussed above, demonstrate that the lifetime term is not greater than necessary, 18 U.S.C. § 3553(a), and is reasonable in light of the nature of Cope’s offense,
id.
§ 3553(a)(1), his history of having a sexual interest in children as early as 1981 and as late as 2003,
id.,
and the need to protect the public once Cope leaves prison,
id.
§ 3553(a)(2)(C). The lifetime term is also reasonable in light of the “pertinent policy statement,”
id.
§ 3553(a)(5), issued by the Sentencing Commission, which recommends the maximum term of supervised release for sex offenses, U.S.S.G. § 5D1.2(c). The Sentencing Guidelines’ definition of “sex offense” includes child pornography possession.
United States v. Allison,
V.
Cope challenges certain special conditions of his supervised release on the *953 grounds that (1) he did not receive notice of the conditions prior to the district court’s announcement of the sentence, and (2) that the district court failed to make adequate findings to support the special conditions of release. The government concedes, at least in part, that these challenges have merit and that a remand is therefore required.
A.
“Where a condition of supervised release is not on the list of mandatory or discretionary conditions in the sentencing guidelines, notice is required before it is imposed, so that counsel and the defendant will have the opportunity to address personally its appropriateness.”
United States v. Wise,
The government concedes a remand is necessary because the district court failed to provide Cope and his counsel with notice of the special conditions requiring Cope, as part of his sex offender treatment program, to take all prescribed medications and to submit to plethysmograph, polygraph, and Abel testing. Because these conditions of supervised release are not contemplated by the Sentencing Guidelines,
4
the district court was required to provide notice before imposing them. Although the district court notified Cope that it would likely impose a sex offender treatment condition, the court gave no indication the treatment condition would involve the possibility of forced medication or plethysmo-graph, polygraph, and Abel testing. Cope’s attorney duly objected to these conditions after the district court read the sentence. Accordingly, we must vacate Cope’s sentence and remand to the district court to permit the parties to address whether these special conditions of supervised release are appropriate.
See Wise,
B.
Cope argues that a remand is also necessary because the district court did not provide a thorough discussion, on the record, of why it was necessary to impose special conditions of supervised release requiring Cope to submit to penile plethysmograph testing and to “take all prescribed medication.” In
United States v. Williams,
we recognized that a condition of supervised release “compelling a person to take antipsychotic medication is an especially grave infringement of liber
*954
ty,” such that the usual rule that a district court need not articulate its reasons for imposing supervised release conditions does not apply.
In
Weber,
we extended the
Williams
rule to conditions requiring those on supervised release to submit to penile plethysmograph testing as part of their sex offender treatment.
Here, the government correctly concedes that we must remand this case back to the district court because it did not articulate, on the record, the necessary
Weber
findings with regard to the condition requiring Cope to submit to plethysmograph testing. The government contends, however, that the heightened requirements of
Williams
and
Weber
do not apply to the condition requiring Cope to “take all prescribed medication.” It is true that
Williams
addressed only anti-psychotic medication, rather than a condition pertaining to forced medication of any kind. Antipsychotic medication, as the
Williams
court pointed out, has received a great deal of attention from this court and the Supreme Court as a particularly intrusive category of drug that alters mental processes, affects behavior and demeanor, and “interferes with a person’s self-autonomy,” in addition to subjecting patients to serious side effects.
Williams,
There is nothing in
Williams
and
Weber
that would suggest that the holdings were limited to the treatments at issue. To the contrary, both decisions imply that the requirement of special findings applies to any imposed treatment or medication that implicates a particularly significant liberty interest. Accordingly, where, as here, a district court orders a defendant to take “any” or “all” medication prescribed by medical or other treatment personnel during his term of supervised release without making heightened
Williams
findings, this all-encompassing medication condition must necessarily be understood as limited to those medications that do not implicate a particularly significant liberty interest of the defendant. If the government wishes to impose upon a defendant a condition relating to a particular medication likely to infringe upon significant liberty interests, it must bring the issue to the attention of the district court, where it bears the burden of demonstrating why the specific medication condition “is necessary to accomplish one or more of the factors listed in § 3583(d)(1) and involves no greater deprivation of liberty than is reasonably necessary.”
Weber,
Given these considerations, we remand this case to the district court to make findings on the record in accordance with
Weber,
VI.
Cope also attacks the medication condition on the ground that it infringes his procedural due process rights and is over-broad. Under normal circumstances, a district court is not required to “articulate on the record at sentencing the reasons for imposing each condition.”
United States v. Rearden,
We agree with Cope, however, that the requirement that he “shall take all prescribed medication” is overbroad insofar as it is not clearly limited to medications that are reasonably related to sex offender treatment. Congress has stated that special conditions of supervised release must be “reasonably related to the factors set forth in section 3553(a)(1), (a)(2)(B), (a)(2)(C), and (a)(2)(D).” 18 U.S.C. § 3583(d)(1). Those factors are “the nature and circumstances of the offense and the history and characteristics of the defendant,” id. § 3553(a)(1), “the need ... to afford adequate deterrence to criminal conduct,” id. § 3553(a)(2)(B), “the need ... to protect the public from further crimes of the defendant,” id. § 3553(a)(2)(C), and “the need ... to provide the defendant with needed educational or vocational training, medical care, or other correctional treatment in the most effective manner,” id. § 3553(a)(2)(D). Each of these factors points primarily to the underlying sex offense committed by Cope and the resulting need for treatment and deterrence. In accordance with the congressional intent, any medication Cope is required to take as a condition of his supervised release must be reasonably related to his treatment as a sex offender. Indeed, were the rule otherwise, a person on supervised release could arguably violate the terms of his release by neglecting to take prescribed cold medications. Therefore, we hold that any medication condition that the district court imposes on remand must be limited to medications reasonably related to Cope’s treatment as a sex offender. 6
VII.
Cope also argues that the sex offender treatment condition requiring him to submit to plethysmograph, Abel, and polygraph testing, as well as to inpatient treatment, is overbroad. Cope cites no authority for this proposition, and we hold that the district court did not abuse its broad discretion in setting these conditions of supervised release.
Williams,
VIII.
Finally, we address whether the special condition of Cope’s supervised release prohibiting him from possessing “any materials ... depicting and/or describing child pornography” is overbroad. Cope contends this condition is overbroad because it exposes him to incarceration for possession of otherwise protected materials “describing” child pornography, such as statutes, caselaw, and Cope’s own writings as part of his sex offender treatment. Cope did not object to this condition below, so we review for plain error.
United States v. Olano,
First, the condition straightforwardly applies to Cope’s own presentence report, as well as copies of statutes and cases that Cope might need were he to bring a collateral challenge to an aspect of his sentence once he is released from prison.
See, e.g.,
18 U.S.C. § 2252A(a)(3)(B) (defining child pornography);
Rearden,
The second error in the condition is that because it bars Cope from possessing “writings ... describing child pornography,” it would, by its plain language, apply to journal-writing or the writing of a “sexual autobiography,”
see United States v. Antelope,
If so amended, this condition of Cope’s supervised release will readily pass constitutional muster. We have already rejected an overbreadth challenge to a similar condition prohibiting a defendant from possessing “any materials depicting sexually explicit conduct as defined by 18 U.S.C. § 2256(2).”
Rearden,
IX.
In conclusion, although we uphold the district court’s sentence of a lifetime term of supervised release, we vacate the sentence and remand to permit the district court: (1) to provide notice to the parties of any special condition of supervised release not contemplated by the Sentencing Guidelines; (2) to articulate specific, medically informed findings on the record regarding the need for Cope to undergo plethysmograph testing and take medications that implicate particularly significant liberty interests; (3) to clarify that any condition requiring Cope to take all prescribed medications is limited to those medications reasonably related to sex offender treatment; and (4) to clarify that the condition prohibiting Cope from possessing materials describing child pornography does not apply to materials necessary to, and used for, a collateral attack, or to materials prepared or used for the purposes of his court-mandated sex offender treatment.
AFFIRMED IN PART; REVERSED IN PART; SENTENCE VACATED AND REMANDED.
Notes
. As we explained in detail in
United States
v.
Weber,
. The current version of the statute has a supervised release range of “any term of years not less than 5, or life." 18 U.S.C. § 3583(k) (2007).
. Cope is correct that the district court misstated some of the facts relating to his prior conviction. The district court incorrectly stated that the 1981 attempted sexual abuse involved Cope's daughter and resulted in two felony convictions, rather than one. The record shows, however, that any error was harmless. The district court believed a lifetime term of supervised release was necessary given Cope’s recidivism and his longstanding sexual interest in children. It is irrelevant, in this context, whether Cope's prior sex offense involved his daughter or a child unrelated to him, or whether the 1981 incident led to two felony convictions or only one.
. The Guidelines do list (1) the mandatory condition that a defendant convicted of a sexual offense must report his residential address to his probation officer and register as a sex offender, U.S.S.G. § 5D1.3(a)(7) (Nov.2002), and (2) the recommended special condition that a defendant convicted of a sexual offense must participate in a sexual offender treatment program,
id.
§ 5D 1.3(d)(7). The Guidelines are silent, however, as to any of the testing or medication requirements the district court included as part of Cope’s treatment program. This case is therefore distinguishable from
United States v. Lopez,
where we noted that the Guidelines specifically contemplated participation in a mental health program.
. In this context of sexual offender treatment, there are at least two examples of medication that would implicate particularly significant liberty interests such that the district court must make the necessary
Williams
and
Weber
findings before Cope may be required to take them as part of his treatment. The first, as we have already held, is any antipsychotic medication.
Williams,
. Because the parties do not raise it, we do not reach the question whether the medication condition, in permitting treatment personnel and the probation officer to determine which medications Cope will be required to take, is an improper delegation of authority.
See United States v. Stephens,
. We, of course, leave open the question whether the plethysmograph testing requirement is reasonably related to the appropriate § 3553(a) factors and "involves no greater deprivation of liberty than is reasonably necessary.” 18 U.S.C. § 3583(d)(1)-(2). As discussed above, the district court must make this determination on the record in accordance with
Weber,
