For example, a writ of habeas corpus ad testificandum directs the custodian to bring the person to court to testify as a witness. If you want to challenge a federal judgment that imposed a sentence to be served in the future, you should file a motion under 28 U.S.C. § 2255 in the federal.In all writs of habeas corpus sought on account of the detention of a spouse or child, the court on hearing all the facts may exercise its discretion. The writ of habeas corpus may be substantially as follows: IN THE. Generally, anyone detained or imprisoned can file a petition for a writ of habeas corpus in the United States. For article, "The Writ of Habeas Corpus in Georgia," see 12 Ga. St. B.J. 20 (2007). Both state and federal courts will hear habeas corpus cases. First: The writ of habeas is most important in the context of death penalty cases. Petitioner was, in fact, given the benefit of the mailbox rule as set out in Houston when he filed his federal habeas corpus petition. Involved in a criminal case or a habeas proceeding for an indigent defendant.