AMENDED IN SENATE AUGUST 19, 2026
AMENDED IN ASSEMBLY MAY 18, 2026
AMENDED IN ASSEMBLY FEBRUARY 23, 2026
CALIFORNIA LEGISLATURE— 2025–2026 REGULAR SESSION
96
Introduced by Assembly Member Schultz
January 16, 2026
An act to amend Sections 1376, 1473, 1473.6, 1473.7, and 1484 of the Penal Code, relating to criminal procedure.
Vote: majority Appropriation: no Fiscal committee: yes Local program: no
LEGISLATIVE COUNSEL’S DIGEST
Existing law allows a person who is unlawfully imprisoned or restrained of their liberty to prosecute a writ of habeas corpus to inquire into the cause of their imprisonment or restraint. Existing law allows a writ of habeas corpus to be prosecuted on several bases, including on the basis of false evidence that is material on the issue of guilt or punishment, as specified, or the discovery of new evidence that exists that is presented without substantial delay, is admissible, and that has not been previously presented and heard at trial and has been discovered after trial. Existing law creates a presumption in favor of granting relief through habeas when the district attorney in the county of the conviction or the Attorney General concedes or stipulates to a legal or factual basis for habeas relief.
This bill would revise the above-described
standards to no longer require false evidence to be material and would instead require that the evidence create any reasonable likelihood it could have affected the outcome of the case. The bill would also change the new evidence standard to instead require that there be a reasonable probability it would have produced a different result sufficient to undermine confidence in the outcome of the case. The bill would revise the presumption in favor of granting relief to instead make a stipulation binding on the parties parties, if certain conditions are met, unless the moving party proves by a preponderance of the evidence that the other party violated the terms or the state withheld evidence, as specified. The bill would also revise the process for a concession and instead prohibit a party from withdrawing a concession made in open court, or in a pleading, as specified. The bill would additionally authorize the petitioner, in order to overcome a procedural bar to relief based on untimeliness or successiveness, to identify changes in law or new
evidence that create a reasonable probability of a different result sufficient to undermine confidence in the outcome of the case. if the concession is contained in a return or other written filing signed by counsel for respondent, as specified.
Existing law allows a person who is no longer unlawfully imprisoned or restrained to prosecute a motion to vacate a judgment on the basis of newly discovered evidence of fraud by a government official that completely undermines the prosecution’s case, is conclusive, and points unerringly to their innocence, newly discovered evidence that a government official testified falsely at trial that resulted in the conviction and that the testimony was substantially probative on the issue of guilt or punishment, or newly discovered evidence of misconduct by a government official committed in the underlying case that resulted in fabrication of evidence that was substantially material and probative on the issue of guilt or punishment.
The bill would revise the above-described standards to instead require a demonstration that there is a reasonable probability the evidence would have produced a different result sufficient to undermine confidence in the outcome of the case, as specified.
The bill would make other conforming changes.
The bill would make related findings and declarations.
The people of the State of California do enact as follows:
SECTION 1.
The Legislature finds and declares all of the following:
(a) According to the 2024 Annual Report from the Committee on Revision of the Penal Code, the Penal Code contains inconsistent and unclear standards for obtaining relief for habeas corpus claims and motions to vacate based on new evidence. The committee also recognized that courts rarely exercise their broad authority to dismiss a criminal action in the furtherance of justice when ruling on a habeas petition, and that often leads to years of unnecessary legal limbo and litigation while the district attorney reviews the case and determines whether to retry the case. The court ruling on the habeas petition typically has enough evidence before it to make a determination about whether the action should be dismissed with prejudice.
(b) It is the intent of the Legislature that courts assessing statutory habeas corpus claims and motions to vacate based on new evidence determine whether the new evidence shows there is a reasonable probability of a different result sufficient to undermine confidence in the outcome of the case. That standard is the same as the one articulated in Strickland v. Washington (1984) 466 U.S. 668 to evaluate claims of ineffective assistance of counsel, and People v. Salazar (2005) 35 Cal.4th 1031 to evaluate violations of Brady v. Maryland (1963) 373 U.S. 83.
(c) Courts considering habeas corpus claims across California do not provide discovery after an order to show cause issues in a consistent manner.
(d) Harmonizing the standard for evaluating these claims, clarifying when courts should allow discovery, and establishing a clear standard to overcome rigid procedural bars that can prevent courts from adjudicating meritorious claims will help correct wrongful convictions and sentences and be a more efficient use of court and other resources. This act reaffirms the Legislature’s intolerance for wrongful convictions and rejection of prior case law’s requirement that innocent people produce evidence that points unerringly to innocence and undermines the prosecution’s entire case.
(e) Harmonizing the standard for evaluating these claims and clarifying when courts should allow discovery will help correct wrongful convictions and sentences and promote more efficient use of court and other resources.
SEC. 2.
Section 1376 of the Penal Code is amended to read:
1376.
(a) As used in this section, the following definitions shall apply:
(1) “Intellectual disability” means the condition of significantly subaverage general intellectual functioning existing concurrently with deficits in adaptive behavior and manifested before the end of the developmental period, as defined by clinical standards.
(2) “Manifested before the end of the developmental period” means that the deficits were present during the developmental period. It does not require a formal diagnosis of intellectual disability, or tests of intellectual functioning in the intellectual disability range, before the end of the developmental period.
(3) “Prima facie showing of intellectual disability” means that the defendant’s allegation of intellectual disability is based on the type of evidence typically relied on by a qualified expert in diagnosing intellectual disability, as defined in current clinical standards, or when a qualified expert provides a declaration diagnosing the defendant as a person with intellectual disability.
(4) “The prosecution” refers to the prosecuting agency at trial and to the respondent in a habeas corpus proceeding.
(b) A person with an intellectual disability is ineligible for the death penalty.
(c) (1) When the prosecution seeks the death penalty, the defendant may, at a reasonable time prior to the commencement of trial, apply for an order directing that a hearing to determine intellectual disability be conducted. Upon a prima facie showing that the defendant is a person with an intellectual disability, the court shall order a hearing to determine whether the defendant is a person with an intellectual disability. At the request of the defendant, the court shall conduct the hearing without a jury prior to the commencement of the trial. The defendant’s request for a court hearing prior to trial shall constitute a waiver of a jury hearing on the issue of intellectual disability. If the defendant does not request a court hearing, the court shall order a jury hearing to determine if the defendant is a person with an intellectual disability. The jury hearing on intellectual disability shall occur at the conclusion of the phase of the trial in which the jury has found the defendant guilty with a finding that one or more of the special circumstances enumerated in Section 190.2 are true. Except as provided in paragraph (3), the same jury shall make a finding that the defendant is a person with an intellectual disability or that the defendant does not have an intellectual disability.
(2) For the purposes of the procedures set forth in this section, the court or jury shall decide only the question of the defendant’s intellectual disability. The defendant shall present evidence in support of the claim that they are a person with an intellectual disability. The prosecution shall present its case regarding the issue of whether the defendant is a person with an intellectual disability. Each party may offer rebuttal evidence. The court, for good cause in furtherance of justice, may permit either party to reopen its case to present evidence in support of or opposition to the claim of intellectual disability. A statement made by the defendant during an examination ordered by the court shall not be admissible in the trial on the defendant’s guilt.
(3) At the close of evidence, the prosecution shall make its final argument, and the defendant shall conclude with their final argument. The burden of proof shall be on the defense to prove by a preponderance of the evidence that the defendant is a person with an intellectual disability. The jury shall return a verdict that either the defendant is a person with an intellectual disability or the defendant does not have an intellectual disability. The verdict of the jury shall be unanimous. When the jury is unable to reach a unanimous verdict that the defendant is a person with an intellectual disability, and does not reach a unanimous verdict that the defendant does not have an intellectual disability, the court shall dismiss the jury and enter a finding that the defendant is ineligible for the death penalty pursuant to this section.
(d) When the hearing is conducted before the court prior to the commencement of the trial, the following shall apply:
(1) If the court finds that the defendant is a person with an intellectual disability, the court shall preclude the death penalty and the criminal trial thereafter shall proceed as in any other case in which a sentence of death is not sought by the prosecution. If the defendant is found guilty of murder in the first degree, with a finding that one or more of the special circumstances enumerated in Section 190.2 are true, the court shall sentence the defendant to confinement in the state prison for life without the possibility of parole. The jury shall not be informed of the prior proceedings or the findings concerning the defendant’s claim of intellectual disability unless the defendant elects to present that information at trial.
(2) If the court finds that the defendant does not have an intellectual disability, the trial court shall proceed as in any other case in which a sentence of death is sought by the prosecution. The jury shall not be informed of the prior proceedings or the findings concerning the defendant’s claim of intellectual disability.
(e) When the hearing is conducted before the jury after the defendant is found guilty with a finding that one or more of the special circumstances enumerated in Section 190.2 are true, the following shall apply:
(1) If the jury finds that the defendant is a person with an intellectual disability, the court shall preclude the death penalty and shall sentence the defendant to confinement in the state prison for life without the possibility of parole.
(2) If the jury finds that the defendant does not have an intellectual disability, the trial shall proceed as in any other case in which a sentence of death is sought by the prosecution.
(f) When the defendant has not requested a court hearing as provided in subdivision (c), and has entered a plea of not guilty by reason of insanity under Sections 190.4 and 1026, the hearing on intellectual disability shall occur at the conclusion of the sanity trial if the defendant is found sane.
(g) A person in custody pursuant to a judgment of death may apply for an order directing that a hearing to determine intellectual disability be conducted as part of a petition for a writ of habeas corpus. When the claim of intellectual disability is raised in a petition for habeas corpus and a petitioner makes a prima facie showing of intellectual disability, the reviewing court shall issue an order to show cause if the petitioner has met the prima facie standard. The petitioner bears the burden of proving by a preponderance of the evidence that the petitioner is a person with an intellectual disability. The prosecution may present its case regarding the issue of whether the petitioner is a person with an intellectual disability. Each party may offer rebuttal evidence. During an evidentiary hearing under this subdivision, an expert may testify about the contents of out-of-court statements, including documentary evidence and statements from witnesses when those types of statements are accepted by the medical community as relevant to a diagnosis of intellectual disability if the expert relied upon these statements as the basis for their opinion.
(h) The results of a test measuring intellectual functioning shall not be changed or adjusted based on race, ethnicity, national origin, or socioeconomic status.
(i) (1) When a court has concluded a hearing under this section is necessary, that court may order a defendant or petitioner to submit to testing by a qualified prosecution expert only if the prosecution presents a reasonable factual basis that the intellectual functioning testing presented by the defendant or petitioner is unreliable. Any order requiring the defendant or petitioner to submit to testing by a qualified prosecution expert shall be limited to tests directly related to the determination of the defendant or petitioner’s intellectual functioning. Any such order shall also prohibit the expert from questioning the defendant or petitioner about the facts of the case, shall permit the defendant or petitioner to have their attorney nearby during the examination and to consult with their attorney during the examination if they choose, and shall, upon request by the defendant or petitioner’s counsel, require that the prosecution expert’s examination be recorded in a manner agreed upon by the parties and the court.
(2) The prosecution shall submit a proposed list of the tests its expert wishes to administer so that the defendant or petitioner may raise any objections before testing is ordered. The Legislature finds and declares that this paragraph is declaratory of existing law.
(j) Intellectual disability is a question of fact. The parties to a trial or habeas proceeding may stipulate that a defendant or petitioner is a person with intellectual disability as defined in clinical standards and in this section. The prosecution’s stipulation or concession in a habeas proceeding pursuant to this section is governed by subdivision (f) of Section 1473. After a prima facie showing of intellectual disability has been made, whenever the prosecution stipulates or concedes that the defendant or petitioner has an intellectual disability,
the court shall accept the stipulation or concession as set forth in subdivision (g) of Section 1473. unless it finds that the stipulation or concession is not supported by documentary evidence that provides a factual basis for concluding by a preponderance of the evidence that the person has an intellectual disability. If the court declines to accept a stipulation or concession, it shall state its factual and legal rationale for doing so on the record, and it may not rely upon facts or factors that are unrelated or irrelevant to the factual question of whether the defendant or petitioner has an intellectual disability, and the procedure set forth in paragraph (3) of subdivision (g) of Section 1473 shall apply.
disability.
SEC. 3.
Section 1473 of the Penal Code is amended to read:
1473.
(a) A person unlawfully imprisoned or restrained of their liberty, under any pretense, may prosecute a writ of habeas corpus to inquire into the cause of the imprisonment or restraint.
(b) (1) A writ of habeas corpus may be prosecuted for, but not limited to, the following reasons:
(A) (i) False evidence on the issue of guilt or punishment was introduced against a person at a hearing or trial relating to the person’s incarceration and created any reasonable likelihood it could have affected the outcome of the case.
(ii) For purposes of this subdivision, “false evidence” includes opinions of experts that have either been repudiated by the expert who originally provided the opinion at a hearing or trial or that have been undermined by the state of scientific knowledge or later scientific research or technological advances.
(B) False physical evidence, believed by a person to be factual or probative on the issue of guilt, which was known by the person at the time of entering a plea of guilty, and which was a material factor directly related to the plea of guilty by the person.
(C) (i) New evidence exists and there is a reasonable probability it would have produced a different result sufficient to undermine confidence in the outcome of the case.
(ii) For purposes of this section, “new evidence” means evidence that has not previously been presented and heard at trial and has been discovered after trial.
(D) A significant dispute exists in the petitioner’s favor regarding expert medical, scientific, or forensic testimony that was introduced at trial or a hearing, there is a reasonable probability that the expert testimony affected the outcome of the case, and the significant dispute was not previously presented and heard at trial.
(i) For purposes of this section, the expert medical, scientific, or forensic testimony includes the expert’s conclusion or the scientific, forensic, or medical facts upon which their opinion is based.
(ii) For purposes of this section, the significant dispute may be as to the reliability or validity of the diagnosis, technique, methods, theories, research, or studies upon which a medical, scientific, or forensic expert based their testimony.
(iii) Under this section, a significant dispute can be established by qualified admissible expert testimony or declaration, or declaration that undermines the reliability or validity of the diagnosis, technique, methods, theories, research, or studies upon which a medical, scientific, or forensic expert at trial, or a hearing,
based their testimony. A significant dispute can also be established by peer reviewed literature showing that experts in the relevant medical, scientific, or forensic community, substantial in number or expertise, have concluded that developments have occurred that undermine the reliability or validity of the diagnosis, technique, methods, theories, research, or studies upon which a medical, scientific, or forensic expert at trial, or a hearing, based their testimony.
(iv) In assessing whether a dispute is significant, the court shall give great weight to evidence that a consensus has developed in the relevant medical, scientific, or forensic community undermining the reliability or validity of the diagnosis, technique, methods, theories, research, or studies upon which a medical, scientific, or forensic expert based their testimony or that there is a lack of consensus as to the reliability or validity of the diagnosis, technique, methods, theories, research, or studies upon which a medical, scientific, or forensic expert based their testimony.
(v) The significant dispute shall exist within the relevant medical, scientific, or forensic community, which includes the scientific community and all fields of scientific knowledge on which those fields or disciplines rely and shall not be limited to practitioners or proponents of a particular scientific or technical field or discipline.
(vi) If the petitioner makes a prima facie showing that they are entitled to relief, the court shall issue an order to show cause why relief shall not be granted. To obtain relief, all the elements of this subparagraph shall be established by a preponderance of the evidence.
(2) Any allegation that the prosecution knew or should have known of the false nature of the evidence is unnecessary for the prosecution of a writ of habeas corpus brought under subparagraph (A) or (B) of paragraph (1). If, however, the prosecution knew or should have known of the false nature of the evidence and failed to correct it at trial, the burden shall shift to the respondent to demonstrate that there is no likelihood that the false evidence impacted the verdict.
(3) This subdivision does not create additional liabilities, beyond those already recognized, for an expert who repudiates the original opinion provided at a hearing or trial or whose opinion has been undermined by scientific research, technological advancements, or because of a reasonable dispute within the expert’s relevant scientific community as to the validity of the methods, theories, research, or studies upon which the expert based their opinion.
(d)
(c) This section does not limit the grounds for which a writ of habeas corpus may be prosecuted or preclude the use of any other remedies.
(d) Notwithstanding any other law, a writ of habeas corpus may also be prosecuted after judgment has been entered based on evidence that a criminal conviction or sentence was sought, obtained, or imposed in violation of subdivision (a) of Section 745, if that section applies based on the date of judgment as provided in subdivision (j) of Section 745.
(1) Any and all definitions and legal thresholds specified in Section 745 are controlling for purposes of claims alleging a violation of subdivision (a) of Section 745 contained within a habeas petition filed under this section.
(2) A petitioner, or their counsel, may file a motion for relevant evidence under subdivision (d) of Section 745 upon the prosecution of a petition under this subdivision, or in preparation to file a petition.
(3) A petition raising a claim of this nature for the first time, or on the basis of new discovery provided by the state or other new evidence that could not have been previously known by the petitioner with due diligence, shall not be deemed a successive or abusive petition.
(4) If the petitioner has a habeas corpus petition pending in state court, but it has not yet been decided, the petitioner may amend the existing petition with a claim that the petitioner’s conviction or sentence was sought, obtained, or imposed in violation of subdivision (a) of Section 745.
(5) The petition shall state if the petitioner requests appointment of counsel and the court shall appoint counsel if the petitioner cannot afford counsel and either the petition pleads a plausible allegation of a violation of subdivision (a) of Section 745 or the State Public Defender requests counsel be appointed. Newly appointed counsel may amend a petition filed before their appointment.
(6) If the defendant is represented by an attorney and the petition alleges a violation of paragraph (1) or (2) of subdivision (a) of Section 745, based in whole or in part on the conduct of one or more law enforcement officers, the attorney shall serve a copy of the motion on the law enforcement agency or agencies that employed the officer or officers.
(7) (A) The court shall review a petition raising a claim pursuant to Section 745 and shall determine if the petitioner has made a prima facie showing. A prima facie determination shall be based on the petitioner’s showing and the record. The court may request an informal response from the state.
(B) If the petitioner makes a prima facie showing, the court shall issue an order to show cause why relief shall not be granted and hold an evidentiary hearing, unless the state declines to show cause. The defendant may appear remotely, and the court may conduct the hearing through the use of remote technology, unless counsel indicates that the defendant’s presence in court is needed.
(C) If the court determines that the petitioner has not established a prima facie showing, the court shall state the factual and legal basis for its conclusion on the record or issue a written order detailing the factual and legal basis for its conclusion.
(8) If the court finds a violation of subdivision (a), the court shall impose one or more of the applicable remedies as outlined in subdivision (e) of Section 745.
(e) If the court holds an evidentiary hearing and the petitioner is incarcerated in state prison, the petitioner may choose not to appear for the hearing with a signed or oral waiver on record, or they may appear remotely through the use of remote technology, unless counsel indicates that the defendant’s presence in court is needed.
(f) (1) For purposes of this section, if the district attorney in the county of conviction or the Attorney General concedes to a factual basis for habeas relief, that concession is binding on the parties. A concession in open court, or in a pleading, including an informal response or a return to an order to show cause, cannot be withdrawn. pursuant to this subdivision is binding only if the concession is contained in a return or other filing signed by counsel for respondent and expressly identifies the factual basis for the concession. That concession cannot be withdrawn and is deemed a forfeiture of the
right to put forth rebuttal evidence.
(2) If the district attorney or Attorney General stipulates to a factual or legal basis for habeas relief, that stipulation is binding on the parties. parties only if it is filed with the court, signed by counsel for both parties, and expressly identifies the factual or legal basis being stipulated to. A stipulation is deemed a forfeiture of the right to put forth rebuttal evidence.
A stipulation may be withdrawn only if the moving party proves by a preponderance of the evidence that the other party violated the stipulation’s terms or that the state withheld evidence that reasonably could have affected the petitioner’s decision to enter into the stipulation.
(3) For purposes of this section, if the district attorney in the county of conviction or the Attorney General concedes or stipulates to a factual or legal basis for habeas relief, there shall be a presumption in favor of granting relief. This presumption may be overcome only if the record before the court contradicts the concession or stipulation or if it would lead to the court issuing an order contrary to law.
(g) (1) If after the court grants postconviction relief under this section and the prosecuting agency elects to retry the petitioner, the petitioner’s postconviction counsel may be appointed as counsel or cocounsel to represent the petitioner on the retrial if both of the following requirements are met:
(A) The petitioner and postconviction counsel both agree for postconviction counsel to be appointed.
(B) Postconviction counsel is qualified to handle trials.
(2) Counsel shall be paid under the applicable pay scale for appointed counsel. Otherwise, the court shall appoint other appropriate counsel.
SEC. 4.
Section 1473.6 of the Penal Code is amended to read:
1473.6.
(a) A person no longer unlawfully imprisoned or restrained may prosecute a motion to vacate a judgment for any of the following reasons:
(1) New evidence of fraud by a government official that demonstrates a reasonable probability it would have produced a different result sufficient to undermine confidence in the outcome of the case.
(2) New evidence that a government official testified falsely at the trial that resulted in the conviction and that there is a reasonable probability the testimony of the government official would have produced a different result sufficient to undermine confidence in the outcome of the case.
(3) New evidence of misconduct by a government official committed in the underlying case that resulted in fabrication of evidence that resulted in the conviction and that there is a reasonable probability the testimony of the government official would have produced a different result sufficient to undermine confidence in the outcome of the case.
(b) For purposes of this section, “new evidence” is evidence that has not previously been presented and heard at trial, and has been discovered after trial.
(c) The procedure for bringing and adjudicating a motion under this section, including the burden of producing evidence and the burden of proof, shall be the same as for prosecuting a writ of habeas corpus.
(d) A motion pursuant to this section shall be filed within one year of the later of the following:
(1) The date the moving party discovered additional evidence of the misconduct or fraud by a government official beyond the moving party’s personal knowledge.
(2) The effective date of this section or any relevant amendments thereto.
SEC. 5.
Section 1473.7 of the Penal Code is amended to read:
1473.7.
(a) A person who is no longer in criminal custody may file a motion to vacate a conviction or sentence for any of the following reasons:
(1) The conviction or sentence is legally invalid due to prejudicial error damaging the moving party’s ability to meaningfully understand, defend against, or knowingly accept the actual or potential adverse immigration consequences of a conviction or sentence. A finding of legal invalidity may, but need not, include a finding of ineffective assistance of counsel.
(2) New evidence exists that demonstrates a reasonable probability it would have produced a different result sufficient to undermine confidence in the outcome of the case.
(3) (A) A conviction or sentence was sought, obtained, or imposed on the basis of race, ethnicity, or national origin in violation of subdivision (a) of Section 745.
(B) If the motion alleges a violation of paragraph (1) or (2) of subdivision (a) of Section 745, based in whole or in part on the conduct of one or more law enforcement officers, the person shall serve a copy of the motion on the law enforcement agency or agencies that employed the officer or officers.
(b) (1) Except as provided in paragraph (2), a motion pursuant to paragraph (1) of subdivision (a) shall be deemed timely filed at any time in which the individual filing the motion is no longer in criminal custody.
(2) A motion pursuant to paragraph (1) of subdivision (a) may be deemed untimely filed if it was not filed with reasonable diligence after the later of the following:
(A) The moving party receives a notice to appear in immigration court or other notice from immigration authorities that asserts the conviction or sentence as a basis for removal or the denial of an application for an immigration benefit, lawful status, or naturalization.
(B) Notice that a final removal order has been issued against the moving party, based on the existence of the conviction or sentence that the moving party seeks to vacate.
(c) A motion pursuant to paragraph (2) or (3) of subdivision (a) shall be filed without undue delay from the date the moving party discovered, or could have discovered with the exercise of due diligence, the evidence that provides a basis for relief under this section or Section 745.
(d) All motions shall be entitled to a hearing. Upon the request of the moving party, the court may hold the hearing without the personal presence of the moving party provided that it finds good cause as to why the moving party cannot be present. If the prosecution has no objection to the motion, the court may grant the motion to vacate the conviction or sentence without a hearing.
(e) In preparation for the filing of a motion pursuant to paragraph (3) of subdivision (a), the defendant may file a motion to obtain discovery as outlined in subdivision (d) of Section 745.
(f) When ruling on the motion:
(1) The court shall grant the motion to vacate the conviction or sentence if the moving party establishes, by a preponderance of the evidence, the existence of any of the grounds for relief specified in subdivision (a). For a motion made pursuant to paragraph (1) of subdivision (a), the moving party shall also establish that the conviction or sentence being challenged is currently causing or has the potential to cause removal or the denial of an application for an immigration benefit, lawful status, or naturalization.
(2) There is a presumption of legal invalidity for the purposes of paragraph (1) of subdivision (a) if the moving party pleaded guilty or nolo contendere pursuant to a statute that provided that, upon completion of specific requirements, the arrest and conviction shall be deemed never to have occurred, where the moving party complied with these requirements, and where the disposition under the statute has been, or potentially could be, used as a basis for adverse immigration consequences.
(3) If the court grants the motion to vacate a conviction or sentence obtained through a plea of guilty or nolo contendere, the court shall allow the moving party to withdraw the plea.
(4) When ruling on a motion under paragraph (1) of subdivision (a), the only finding that the court is required to make is whether the conviction is legally invalid due to prejudicial error damaging the moving party’s ability to meaningfully understand, defend against, or knowingly accept the actual or potential adverse immigration consequences of a conviction or sentence. When ruling on a motion under paragraph (2) of subdivision (a), the court shall specify the basis for its conclusion.
(5) If the court grants a motion made pursuant to paragraph (3) of subdivision (a), the court shall impose one or more of the applicable remedies as outlined in subdivision (e) of Section 745.
(g) An order granting or denying the motion is appealable under subdivision (b) of Section 1237 as an order after judgment affecting the substantial rights of a party.
(h) A court may only issue a specific finding of ineffective assistance of counsel as a result of a motion brought under paragraph (1) of subdivision (a) if the attorney found to be ineffective was given timely advance notice of the motion hearing by the moving party or the prosecutor, pursuant to Section 416.90 of the Code of Civil Procedure.
SEC. 6.
Section 1484 of the Penal Code is amended to read:
1484.
(a) The party brought before the court or judge, on the filing of the return of the writ, may deny or controvert any of the material facts or matters set forth in the return, or except to the sufficiency thereof, or allege any fact to show either that their imprisonment or detention is unlawful, or that they are entitled to discharge.
(b) On the filing of the return of the writ, the court or judge has full power and authority to require and compel production of discovery for good cause or the attendance of witnesses, by process of subpoena and attachment, and to do and perform all other acts and things necessary to a full and fair hearing and determination of the case.
(c) After the return and denial are filed and formal briefing is complete, the court or judge shall thereupon proceed in a summary way to hear such proof as may be produced for or against imprisonment or detention. The court has broad authority to fashion appropriate relief if granting relief from a habeas petition. A court, in exercising its discretion pursuant to Section 1385, may dismiss the pending action with or without prejudice.