Tex. Code Crim. Proc. art. 17.19
(a) Subject to Subsection (a-1), a surety that wants to surrender the surety's principal and has notified the principal's attorney, if the principal is represented by an attorney, in a manner provided by Rule 21a, Texas Rules of Civil Procedure, of the surety's intention to surrender the principal, may file an affidavit of that intention before the court or magistrate before which the prosecution is pending. The affidavit must state:
(b) In a prosecution pending before a court, if the court finds that there is cause for the surety to surrender the surety's principal, the court shall issue a capias for the principal. In a prosecution pending before a magistrate, if the magistrate finds that there is cause for the surety to surrender the surety's principal, the magistrate shall issue a warrant of arrest for the principal. It is an affirmative defense to any liability on the bond that:
Acts 1965, 59th Leg., vol. 2, p. 317, ch. 722.
Amended by Acts 1987, 70th Leg., ch. 1047, Sec. 2, eff. June 20, 1987; Subsec. (b) amended by Acts 1989, 71st Leg., ch. 374, Sec. 3, eff. Sept. 1, 1989; Subsec. (a) amended by Acts 1999, 76th Leg., ch. 1506, Sec. 3, eff. Sept. 1, 1999; Subsec. (b) amended by Acts 2003, 78th Leg., ch. 942, Sec. 4, eff. June 20, 2003; Subsec. (c) amended by Acts 2003, 78th Leg., ch. 942, Sec. 4, eff. June 20, 2003; Subsec. (d) amended by Acts 2003, 78th Leg., ch. 942, Sec. 4, eff. June 20, 2003; Subsec. (e) amended by Acts 2003, 78th Leg., ch. 942, Sec. 4, eff. June 20, 2003.
Acts 2007, 80th Leg., R.S., Ch. 1263 (H.B. 3060), Sec. 2, eff. September 1, 2007.
Acts 2025, 89th Leg., R.S., Ch. 418 (H.B. 2697), Sec. 1, eff. September 1, 2025.