Who Can File a State Habeas Corpus Petition? Any person "in custody" can file a state habeas corpus petition.The Writ of Habeas Corpus protects prison inmates from false imprisonment to ensure people are not thrown into jail unlawfully. If you are filing this petition in the superior court, you only need to file the original unless local rules require additional copies. A writ of habeas corpus petition is a tool that individuals convicted of criminal offenses in California can use to challenge their imprisonment. Married parents who wish to obtain custody or visitation orders must first open a family law case, usually for dissolution of marriage (divorce). If the court finds that the facts in the petition hold water, it may order the government to file a response to the petition. You must file your habeas petition while you are still under some form of custody or parole. Habeas corpus is available in child custody cases. The court assigns a judge to review such writs and determine if it should be set for a hearing or denied.