10 USC 12311 - Active duty agreements

(a) To provide definite terms of active duty (other than for training) for Reserves with their consent, the Secretary concerned may make a standard written agreement with any member of a reserve component under his jurisdiction requiring the member to serve for a period of active duty (other than for training) of not more than five years. When such an agreement expires, a new one may be made. This subsection does not apply in time of war declared by Congress.
(b) An agreement may not be made under subsection (a) unless the specified period of duty is at least 12 months longer than any period of active duty that the member is otherwise required to perform.
(c) Agreements made under subsection (a) shall be uniform so far as practicable, and are subject to such standards and policies as may be prescribed by the Secretary of Defense for the armed forces under his jurisdiction or by the Secretary of Homeland Security for the Coast Guard when the Coast Guard is not operating as a service in the Navy.
(d) If an agreement made under subsection (a) expires during a war or during a national emergency declared by Congress or the President after January 1, 1953, the Reserve concerned may be kept on active duty, without his consent, as otherwise prescribed by law.