Sec. 6. ISSUANCE OF WRIT. (a) If a timely application for a writ of habeas corpus is filed in the convicting court, a writ of habeas corpus, returnable to the court of criminal appeals, shall issue by operation of law.
(b) If the convicting court receives notice that the requirements of Section 5 for consideration of a subsequent application have been met, a writ of habeas corpus, returnable to the court of criminal appeals, shall issue by operation of law.
(b-1) If the convicting court receives notice that the requirements of Section 5(a) for consideration of a subsequent application have been met and if the applicant has not elected to proceed pro se and is not represented by retained counsel, the convicting court shall appoint, in order of priority:
(1) the attorney who represented the applicant in the proceedings under Section 5, if the attorney seeks the appointment;
(2) the office of capital and forensic writs, if the office represented the applicant in the proceedings under Section 5 or otherwise accepts the appointment; or
(3) counsel from a list of competent counsel maintained by the presiding judges of the administrative judicial regions under Section 78.056, Government Code, if the office of capital and forensic writs:
(A) did not represent the applicant as described by Subdivision (2); or
(B) does not accept or is prohibited from accepting the appointment under Section 78.054, Government Code.
(b-2) Regardless of whether the subsequent application is ultimately dismissed, compensation and reimbursement of expenses for counsel appointed under Subsection (b-1) shall be provided as described by Section 2, 2A, or 3, including compensation for time previously spent and reimbursement of expenses previously incurred with respect to the subsequent application.
(c) The clerk of the convicting court shall:
(1) make an appropriate notation that a writ of habeas corpus was issued;
(2) assign to the case a file number that is ancillary to that of the conviction being challenged; and
(3) send a copy of the application by certified mail, return receipt requested, or by secure electronic mail to the attorney representing the state in that court.
(d) The clerk of the convicting court shall promptly deliver copies of documents submitted to the clerk under this article to the applicant and the attorney representing the state.