The procedures for applications for writs of habeas corpus are located in chapter 11 of the Code of Criminal Procedure. An application for writ of habeas corpus is generally raised following the normal appeals process is complete. People that have a conviction in felony cases, receive the death penalty, or receive community supervision can apply for writs of habeas corpus.