Sec. 6. (a) Not later than the 60th day after the day on which the state's answer is filed, the trial court shall enter a written order granting or denying the relief sought in the application.
(b) In making its determination, the court may order affidavits, depositions, interrogatories, or a hearing, and may rely on the court's personal recollection.
(c) If a hearing is ordered, the hearing may not be held before the eighth day after the day on which the applicant and the state are provided notice of the hearing.
(d) The court may appoint an attorney or magistrate to hold a hearing ordered under this section and make findings of fact. An attorney appointed under this subsection is entitled to compensation as provided by Article 26.05.
Sec. 7. (a) If the court determines from the face of an application or documents attached to the application that the applicant is manifestly entitled to no relief, the court shall enter a written order denying the application as frivolous. In any other case, the court shall enter a written order including findings of fact and conclusions of law. The court may require the prevailing party to submit a proposed order.
(b) At the time an order is entered under this section, the clerk of the court shall immediately, by certified mail, return receipt requested, or by secure electronic mail, send a copy of the order to the applicant and to the state.
Sec. 8. If the application is denied in whole or part, the applicant may appeal under Article 44.02 and Rule 31, Texas Rules of Appellate Procedure. If the application is granted in whole or part, the state may appeal under Article 44.01 and Rule 31, Texas Rules of Appellate Procedure.
Sec. 9. (a) If a subsequent application for a writ of habeas corpus is filed after final disposition of an initial application under this article, a court may not consider the merits of or grant relief based on the subsequent application unless the application contains sufficient specific facts establishing that the current claims and issues have not been and could not have been presented previously in an original application or in a previously considered application filed under this article because the factual or legal basis for the claim was unavailable on the date the applicant filed the previous application.
(b) For purposes of Subsection (a), a legal basis of a claim is unavailable on or before a date described by that subsection if the legal basis was not recognized by and could not have been reasonably formulated from a final decision of the United States Supreme Court, a court of appeals of the United States, or a court of appellate jurisdiction of this state on or before that date.
(c) For purposes of Subsection (a), a factual basis of a claim is unavailable on or before a date described by that subsection if the factual basis was not ascertainable through the exercise of reasonable diligence on or before that date.