The University of Texas System, on behalf of several of its subsidiary medical institutions (collectively “UT”), sued the United States seeking refund of the Social Security component of Federal Insurance Contributions Act taxes it paid with respect to the service of medical residents in 2005. UT asserted that the residents were exempt from Social Security taxes because they were “students” under an agreement between the State of Texas and the Commissioner of Social Security. After the parties filed cross-motions for summary judgment, the district court denied UT’s motion and granted summary judgment for the United States, finding that the residents were not students under the agreement. UT appealed. Because we conclude that UT’s residents are not “students” within the meaning of the agreement between Texas and the Commissioner of Social Security, we AFFIRM.
I. Statutory and Regulatory Background
“Through the Social Security Act and related legislation, Congress has created a comprehensive national insurance system that provides benefits for retired workers, disabled workers, unemployed workers, and their families. Congress funds Social Security by taxing both employers and employees under [the Federal Insurance Contributions Act (“FICA”) ] on the wages employees earn.” Mayo Found, for Med. Educ. & Research v. United States, 562 U.S. 44, 131 S.Ct. 704, 709, 178 L.Ed.2d 588 (2011) (citations omitted). When Congress adopted the Social Security Act in 1935, it excluded service performed by state employees from coverage due to questions about whether it could compel state participation. Bowen v. Pub. Agencies Opposed to Soc. Sec. Entrapment, 477 *439U.S. 41, 44, 106 S.Ct. 2390, 91 L.Ed.2d 35 (1986). In 1950, however, Congress enacted 42 U.S.C. § 418 (“Section 218” of the Social Security Act), which allows states to voluntarily opt-in to the Social Security system by entering into an agreement with the Commissioner of Social Security. Id. at 44-45, 106 S.Ct. 2390. Through a “§ 418 or § 218 agreement,” as it is commonly called, a state may define to a certain extent which state employees participate in Social Security. See id. at 45, 106 S.Ct. 2390. The Internal Revenue Code’s state employee exemption incorporates the various state § 418 agreements by excluding from FICA taxation “service performed in the employ of a State” unless that service is “included under an agreement entered into pursuant to section 218 of the Social Security Act.” 26 U.S.C. § 3121(b)(7)(E).1
When opting in classes of employees through a § 418 agreement, states may also employ exclusions in their agreement to ensure that specified subsets of employees are not opted-in through the § 418 agreement. One of the optional exclusions that a state may include within its § 418 agreement is for “service performed by a student.” 42 U.S.C. § 418(c)(5). Section 418(c)(5) cross references the general student exclusion applicable to private employers in § 410(a)(10), which is defined as applying to “[s]ervice performed in the employ of ... a school, college, or university ... if such service is performed by a student who is enrolled and regularly attending classes at such school, college, or university.” See § 418(c)(5); Minnesota v. Apfel, 151 F.3d 742, 747 (8th Cir.1998) (noting § 418(c)(5)’s cross reference to § 410(a)(10)).
In 1978, the Commissioner of Social Security issued a ruling addressing Arizona’s contention that medical residents were not employees because, among other arguments, “they were students whose services were excluded from coverage under [Arizona’s] section 218 agreement.” See SSR 78-3, 1978 WL 14050 (1978). The Commissioner of Social Security found the medical residents were not excluded from coverage under the student exclusion in Arizona’s § 418 agreement, explaining that “[t]he Social Security Administration has always held that resident physicians are not students.” Id. In Apfel, the Eighth Circuit declined to defer to the Social Security Administration’s (“SSA”) ruling because it found it to be inconsistent with the Social Security regulation at 20 C.F.R. § 404.1028(c), which applies the general student exclusion at 42 U.S.C. § 410(a)(10). See 151 F.3d at 748. In response to Apfel, the SSA issued an “Acquiescence Ruling,” stating that “[u]nder SSA rules, the services performed by medical residents do not qualify for the student exclusion,” but that the SSA would apply Apfel’s case-by-case approach in the Eighth Circuit. SSAR 98-5(8), 63 Fed. Reg. 58,444, 58,446 (Oct. 30,1998).
II. Factual and Procedural Background
The State of Texas entered into a § 418 agreement in 1951. Texas’s original § 418 agreement did not exclude service performed by a student. In 1998, Congress amended the Social Security Act to allow states to exclude student services that were previously opted-in through a § 418 agreement. See Act of October 21, 1998, Pub.L. No. 105-277, § 2023(a), 112 Stat. 2681. Pursuant to that authorization, Texas amended its § 418 agreement in 1999 to *440“exclude from coverage service performed after June 30, 2000, in the employ of a school, college or university if such service is performed by a student who is enrolled and regularly attending classes [there].” The modification applies to “all student employees of the State of Texas,” including “student employees of ... The University of Texas System.”
According to UT’s amended complaint, its medical institutions operate medical residency programs that provide training for doctors who have completed medical school (“residents”). These residents “receive didactic lessons (including ‘teaching rounds,’ lectures and procedural workshops) and provide care for patients under the supervision of institution faculty,” regularly working more than forty hours per week. Upon satisfactory completion of a residency program and relevant board licensing examinations, residents receive certification in their field of medicine from a national accreditation body.
At the time Texas’s § 418 agreement was modified to exclude students from coverage, UT was withholding the employee portion of FICA taxes as to its residents and paying the employer portion of FICA taxes as to its residents. After the addition of the student exclusion to Texas’s § 418 agreement, UT continued to treat the residents as covered by Social Security by withholding and paying FICA taxes. UT did not seek administrative refunds regarding its residents until April 2008.
In 2009, UT filed suit against the United States. Count two of UT’s amended complaint sought a refund of Social Security FICA taxes paid as to residents for the second, third, and fourth quarters of 2005 on the ground that the residents were exempt under the student exclusion in Texas’s § 418 agreement.2 The United States filed a crossclaim to recover an alleged erroneous refund of FICA taxes regarding the University of Texas Health Science Center San Antonio for the second, third, and fourth quarters of 2005. UT moved for summary judgment on count two, seeking a declaration that a case-by-case approach applied to the determination of whether its residents were “students” for purposes of the student exclusion in Texas’s § 418 agreement. The United States filed a cross-motion for summary judgment on its crossclaim and count two of UT’s amended complaint, requesting that the district court find, as a matter of law, that the medical residents employed by UT are not students for purposes of FICA taxes or the student exclusion in Texas’s § 418 agreement. The district court denied UT’s motion and granted the government’s motion, supporting its holding on three alternative grounds: (1) Treasury regulations, which include a full-time employee rule, governed such that the residents were not students; (2) even assuming Social Security regulations governed, the residents were not students in light of the SSA’s rule that medical residents are not students; and (3) even under a contractual approach, the residents were not students under Texas’s § 418 agreement. The district court entered final judgment pursuant to Federal Rule of Civil Procedure 54(b), denying relief on count two of UT’s amended complaint and granting relief on the United States’ crossclaim. UT timely appealed.
III. Standard of Review
Summary judgment is appropriate when “there is no genuine dispute as to any material fact and the movant is entitled to judgment as a matter of law.” *441Fed.R.Civ.P. 56(a). We review a grant of summary judgment de novo, construing all facts and evidence in the light most favorable to the nonmovant. See EEOC v. Chevron Phillips Chem. Co., 570 F.3d 606, 615 (5th Cir.2009).
IV. Discussion
The parties’ arguments in this case track the district court’s three alternative grounds for its holding. Consequently, as the third of their three alternative arguments, both parties argue that even applying a contractual analysis we should find in their favor. The parties do not explain why they treat straightforward contractual interpretation as a fallback approach, nor do they argue that this approach is a legally incorrect way to determine whether resident service is included under Texas’s § 418 agreement. Because we hold that a contractual analysis is the proper approach to the analysis in this context and that under such an analysis UT’s medical residents do not fall within the meaning of the term “student” as it is used in Texas’s § 418 agreement, we conclude that the district court’s grant of summary judgment in favor of the United States was proper.
A. Contract Construction is the Proper Approach
The applicable statutory text, Texas’s § 418 agreement, and the case law indicate that Texas’s § 418 agreement is contractual in nature. UT invokes the state employee exemption in the Internal Revenue Code to argue that its residents are exempt from FICA taxes. See 26 U.S.C. § 3121(b)(7)(E). According to the plain language of this exemption, service performed for a state entity is not employment for purposes of FICA taxation unless that service is “included under an agreement entered into pursuant to section 218 of the Social Security Act [42 U.S.C. § 418].” Id. Likewise, 42 U.S.C. § 418 provides that the term “employment,” for purposes of the Social Security Act, encompasses “service included under” a state’s § 418 agreement. § 418(a)(2). In other words, the scope of the state employee exemption, in both the Internal Revenue Code and the Social Security Act, is necessarily determined by the scope of each individual state’s § 418 agreement: the dispositive issue in discerning the extent of coverage is whether the service at issue is “included under” an agreement. This suggests that construction of the applicable § 418 agreement is the proper approach for deciding the extent of coverage. Furthermore, § 418 does not simply speak of the state designating whether it wishes to participate in the Social Security program. Rather, § 418 provides that “[t]he Commissioner of Social Security shall ... enter into an agreement with [a] State,” which will include such provisions as the state may request. § 418(a)(1). The relevant statutory text thus indicates that these agreements between the SSA and the several states are contractual in their ability to govern the obligations of the states and the SSA under the Social Security Act and Internal Revenue Code.
Additionally, Texas’s § 418 agreement appears to be a contract. It states that the Social Security Administrator and the State of Texas “hereby agree ... to extend ... the insurance system established by title II of the Social Security Act” to the employees performing those services listed in the agreement. It is signed by both the Commissioner of Social Security and the Executive Director of the Texas Department of Public Welfare. It obligates the SSA to extend Social Security coverage to the services encompassed by the agreement and obligates Texas to pay taxes on those services covered by the agreement.
The Supreme Court’s opinion in Bowen, 477 U.S. 41, 106 S.Ct. 2390, involving Cali-*442forma’s § 418 agreement, is instructive as well. California’s agreement contained a provision, mirroring § 418(g), that allowed California to terminate coverage previously opted-in through the agreement. Id. at 48 — 49, 106 S.Ct. 2390. However, Congress amended § 418(g) to prohibit states from terminating coverage under an agreement. Id. at 48, 106 S.Ct. 2390. California challenged the validity of the amendment, arguing that it had a contractual right to terminate coverage and that the amendment deprived it of this right without just compensation in violation of the Fifth Amendment. Id. at 49, 106 S.Ct. 2390. Faced with this argument, the district court construed the § 418 agreement as a contract, held that it created a contractual right to withdraw from the Social Security System, and held that the amendment was unconstitutional under the Fifth Amendment. Id. at 50-51, 106 S.Ct. 2390.
The Supreme Court reversed, but it did not do so on the basis that the agreement was not a contract or should not be construed as a contract. Instead, it held that Congress could modify the agreement since it reserved the right to “alter, amend, or repeal any provision” of the Social Security Act and “the Agreement expressly incorporated § 418, which of course was fully subject to Congress’ reserved power of amendment.” Id. at 51-54, 106 S.Ct. 2390 (citation and internal quotation marks omitted). Seeming to assume that California’s § 418 agreement was a contract, the Court relied on the tenet that “contractual arrangements, including those to which a sovereign itself is party, remain subject to subsequent legislation by the sovereign.” Id. at 52, 106 S.Ct. 2390 (citation and internal quotation marks omitted); see generally id. at 52-54, 106 S.Ct. 2390. The Supreme Court criticized the district court for “heed[ing] none of [the] Court’s often-repeated admonitions that contracts should be construed, if possible, to avoid foreclosing exercise of sovereign authority.” Id. at 52-53, 106 S.Ct. 2390. The Court thus indicated that § 418 agreements are contracts, which are generally subject to subsequent legislation by Congress.3
In the first of two alternative holdings in Apfel — the primary case urged by UT— the Eighth Circuit likewise explained that “the Court in Bowen actually assumed that [§ 418] agreements are contracts.” 151 F.3d at 746.4 The Eighth Circuit held that *443Minnesota’s § 418 agreement was to be construed as a contract and that the parties’ intent was controlling. See id. at 745-47 (agreeing with the district court’s holding that Minnesota’s § 418 agreement “was a contract and that its terms must be interpreted by giving effect to the intent of the parties”). There, the “uncontroverted evidence demonstrated that when the parties executed the modification [to Minnesota’s § 418 agreement], they did not intend to extend coverage [of the agreement to pay taxes] to the medical residents.” Id. at 745. The Eighth Circuit’s primary holding was therefore that Social Security coverage and associated tax withholding did not extend to residents of the University of Minnesota given the parties’ mutual intent to that effect. See id. at 747.
In light of these indications that a § 418 agreement is to be construed as a contract between a state and a federal agency, we find it proper to take the approach employed in the primary holding in Apfel. We therefore use contract principles to construe the student exclusion in Texas’s § 418 agreement.5
B. Applying Contract Principles to Texas’s § f 18 Agreement
“[Obligations to and rights of the United States under its contracts are governed exclusively by federal law.” Boyle v. United Techs. Corp., 487 U.S. 500, 504, 108 S.Ct. 2510, 101 L.Ed.2d 442 (1988); see also United States v. Seckinger, 397 U.S. 203, 209-10, 90 S.Ct. 880, 25 L.Ed.2d 224 (1970). Applying federal law in the contract context includes looking to “principles of general contract law” that can be found in treatises or restatements of the law. Franconia Assocs. v. United States, 536 U.S. 129, 141-42, 122 S.Ct. 1993, 153 L.Ed.2d 132 (2002) (citation and internal quotation marks omitted); see also Mobil Oil Exploration & Producing Se. v. United States, 530 U.S. 604, 607-08, 120 S.Ct. 2423, 147 L.Ed.2d 528 (2000); Seckinger, 397 U.S. at 210, 90 S.Ct. 880.
The overarching consideration in interpreting an agreement is to give effect to the principle purpose of the agreement as understood in light of the agreement as a whole and all the circumstances. See Restatement (Seoond) of CONTRACTS § 202(l)-(2) (1981); see also Apfel, 151 F.3d at 745-47 (holding that a § 418 agreement “must be interpreted by giving effect to the intent of the parties”). The student exclusion in Texas’s § 418 agreement mirrors that at 42 U.S.C. § 410(a)(10), thereby indicating that the parties intended to incorporate the Social Security Act’s general student exclusion.6 This understanding by itself, however, does not resolve whether the parties intended for the student exclusion in Texas’s § 418 agreement to apply to residents, *444since § 410(a)(10) does not actually define the term “student” or answer whether medical residents are students. Cf. Mayo, 131 S.Ct. at 711 (holding that the almost identical language at 26 U.S.C. § 3121(b)(10) “does not define the term ‘student,’ and does not otherwise attend to the precise question whether medical residents are subject to FICA”).7 The scope of the term “student” must be considered within the context of the specific agreement or statute before the court. See id. at 715-16 (“We do not doubt that ... residents are engaged in a valuable educational pursuit or that they are students of their craft. The question whether they are ‘students’ for purposes of § 3121, however, is a different matter.”). Here, any initial uncertainty as to whether UT’s medical residents are students within the meaning of Texas’s § 418 agreement is resolved through further application of general principles of contract law.
At the time when the student exclusion was added to Texas’s § 418 agreement in 1999, the SSA clearly disclosed its understanding that medical residents did not fall within the meaning of the term “student” as that term is used in the student exclusion that states could incorporate into their § 418 agreements. A 1978 Social Security Ruling explained that the SSA “has always held that resident physicians are not students.” SSR 78-3, 1978 WL 14050 (1978). In 1998, the SSA unsuccessfully advocated in favor of this meaning in Apfel, 151 F.3d at 748. Shortly after the decision in Apfel, the SSA reaffirmed its understanding that “[ujnder SSA rules, the services performed by medical residents do not qualify for the student exclusion.” SSAR 98-5(8), 63 Fed.Reg. 58,444, 58,446 (Oct. 30, 1998). The SSA also made clear that it would employ the case-by-case approach used in Apfel only in regard to “Federal-State agreements for coverage and subsequent modifications under section 218 of the Act involving Arkansas, Iowa, Minnesota, Missouri, Nebraska, North Dakota or South Dakota.” Id. This all occurred prior to Texas adding the student exclusion to its § 418 agreement.
UT does not point to any evidence that Texas understood the student exclusion to carry a different meaning than that held by the SSA at the time the agreement was amended. More decisively, to the extent that Texas defined the student exclusion differently from the SSA’s well-disclosed meaning, there was no reason for the SSA to know this as Texas did not disclose any such contrary meaning. In this circumstance, it is hornbook contract law that the well-disclosed meaning of the SSA governs as opposed to any undisclosed meaning that Texas might have held. See United *445 States v. Stuart, 489 U.S. 353, 367 n. 7, 109 S.Ct. 1183, 103 L.Ed.2d 388 (1989) (“It is hornbook contract law that the proper construction of an agreement is that given by one of the parties when ‘that party had no reason to know of any different meaning attached by the other, and the other had reason to know the meaning attached by the first party.’ ” (quoting Restatement (Seoond) of ContRACts § 201(2)(b))); see also 5 Margaret N. Kiffin, Corbin on CONTRACTS § 24.5 (Joseph M. Perillo, ed.2014).8
The parties’ course of performance likewise indicates that UT’s medical residents do not fall within the student exclusion in Texas’s § 418 agreement. “[G]reat weight” should be given to the fact that UT repeatedly paid and withheld FICA taxes on its residents after the student exclusion was added to Texas’s § 418 agreement in 1999. Restatement (Seoonb) of CONTRACTS § 202(4) (“Where an agreement involves repeated occasions for performance by either party with knowledge of the nature of the performance and opportunity for objection to it by the other, any course of performance accepted or acquiesced in without objection is given great weight in the interpretation of the agreement.”); see also 5 Margaret N. Kif-fin, Corbin on Contracts § 24.16. It was not until 2008 that UT objected to this performance under the agreement by filing an administrative claim for a refund with the IRS. This course of performance is thus strong evidence that the parties did not intend for the student exclusion in Texas’s § 418 agreement to apply to UT’s medical residents. Significantly, the inverse course of performance occurred in Apfel: the University of Minnesota “had consistently treated the residents’ stipends as excluded from coverage for more than thirty years.” 151 F.3d at 745 n. 7. The Eighth Circuit thus listed this factor as among the uncontroverted evidence that the parties’ intended for the medical residents to be excluded from coverage. Id. at 745 & n. 7.
In sum, the well-disclosed meaning given to the term “student” by the SSA is confirmed by approximately eight years of conforming performance by UT and is not contradicted by a contrary meaning disclosed by Texas at the time of the agreement. These consistent manifestations of the parties’ mutual intent compel the conclusion that UT’s medical residents are not students within the meaning of the student exclusion in Texas’s § 418 agreement (and we limit our holding to this particular context only).9 See Restatement (Seoond) of Contracts § 202(5) (“Wherever reasonable, the manifestations of intention of the parties to a promise or agreement are interpreted as consistent with each other and with any relevant course of performance, course of dealing, or usage of trade.”). To borrow the language of the Supreme Court, “[w]e do not doubt that [UT’s] residents are engaged in a valuable educational pursuit or that they are students of their craft. The question whether they are ‘students’ for purposes of [Texas’s § 418 agreement], however, is a different matter.” Mayo, 131 S.Ct. at 715-16. As the Eighth Circuit concluded in its primary holding in Apfel, we hold that the parties’ intent on this issue at the time they modified the agreement is controlling. See Apfel, 151 F.3d at 747.10 Accordingly, *446summary judgment in favor of the United States was proper because UT’s residents are not students within the meaning of the student exclusion in Texas’s § 418 agreement.
AFFIRMED.