Code of Civil Procedure

Code of Civil Procedure section 581Dismissal of an action

Cite as Code Civ. Proc., § 581. Read from the California Legislature's official code files on November 15, 2026.

What this means for your filing

When an action may be dismissed by the plaintiff, by the court or on motion, and whether the dismissal is with or without prejudice.

The time and length limits in the text

Quoted word for word from the official text below.

  • Subdivision (b)(3)(3) By the court, without prejudice, when no party appears for trial following 30 days’ notice of time and place of trial.

Before you file

  1. 1Quote Code Civ. Proc., § 581 from the official text, as it reads today, not from memory or an AI summary.
  2. 2Check the assigned judge's own department rules and recent tentative rulings. A department can set an earlier briefing deadline, a shorter page limit or its own format than the code or the Rules of Court; Aristo reads them for the judge you drew.
  3. 3See how the assigned judge has ruled on the same kind of motion, counted from the judge's own tentative rulings where the court posts them. Aristo counts them by motion type for the judge you drew.

Official text

(a) As used in this section:

(1) “Action” means any civil action or special proceeding.

(2) “Complaint” means a complaint and a cross-complaint.

(3) “Court” means the court in which the action is pending.

(4) “Defendant” includes a cross-defendant.

(5) “Plaintiff” includes a cross-complainant.

(6) “Trial.” A trial shall be deemed to actually commence at the beginning of the opening statement or argument of any party or his or her counsel, or if there is no opening statement, then at the time of the administering of the oath or affirmation to the first witness, or the introduction of any evidence.

(b) An action may be dismissed in any of the following instances:

(1) With or without prejudice, upon written request of the plaintiff to the clerk, filed with papers in the case, or by oral or written request to the court at any time before the actual commencement of trial, upon payment of the costs, if any.

(2) With or without prejudice, by any party upon the written consent of all other parties.

(3) By the court, without prejudice, when no party appears for trial following 30 days’ notice of time and place of trial.

(4) By the court, without prejudice, when dismissal is made pursuant to the applicable provisions of Chapter 1.5 (commencing with Section 583.110).

(5) By the court, without prejudice, when either party fails to appear on the trial and the other party appears and asks for dismissal.

(c) A plaintiff may dismiss his or her complaint, or any cause of action asserted in it, in its entirety, or as to any defendant or defendants, with or without prejudice prior to the actual commencement of trial.

(d) Except as otherwise provided in subdivision (e), the court shall dismiss the complaint, or any cause of action asserted in it, in its entirety or as to any defendant, with prejudice, when upon the trial and before the final submission of the case, the plaintiff abandons it.

(e) After the actual commencement of trial, the court shall dismiss the complaint, or any causes of action asserted in it, in its entirety or as to any defendants, with prejudice, if the plaintiff requests a dismissal, unless all affected parties to the trial consent to dismissal without prejudice or by order of the court dismissing the same without prejudice on a showing of good cause.

(f) The court may dismiss the complaint as to that defendant when:

(1) Except where Section 597 applies, after a demurrer to the complaint is sustained without leave to amend and either party moves for dismissal.

(2) Except where Section 597 applies, after a demurrer to the complaint is sustained with leave to amend, the plaintiff fails to amend it within the time allowed by the court and either party moves for dismissal.

(3) After a motion to strike the whole of a complaint is granted without leave to amend and either party moves for dismissal.

(4) After a motion to strike the whole of a complaint or portion thereof is granted with leave to amend the plaintiff fails to amend it within the time allowed by the court and either party moves for dismissal.

(g) The court may dismiss without prejudice the complaint in whole, or as to that defendant, when dismissal is made under the applicable provisions of Chapter 1.5 (commencing with Section 583.110).

(h) The court may dismiss without prejudice the complaint in whole, or as to that defendant, when dismissal is made pursuant to Section 418.10.

(i) No dismissal of an action may be made or entered, or both, under paragraph (1) of subdivision (b) where affirmative relief has been sought by the cross-complaint of a defendant or if there is a motion pending for an order transferring the action to another court under the provisions of Section 396b.

(j) No dismissal may be made or entered, or both, under paragraph (1) or (2) of subdivision (b) except upon the written consent of the attorney for the party or parties applying therefor, or if consent of the attorney is not obtained, upon order of dismissal by the court after notice to the attorney.

(k) No action may be dismissed which has been determined to be a class action under the provisions of this code unless and until notice that the court deems adequate has been given and the court orders the dismissal.

(l) The court may dismiss, without prejudice, the complaint in whole, or as to that defendant when either party fails to appear at the trial and the other party appears and asks for the dismissal.

(m) The provisions of this section shall not be deemed to be an exclusive enumeration of the court’s power to dismiss an action or dismiss a complaint as to a defendant.

Source and history

Citation
Code Civ. Proc., § 581
Effective
January 1, 1994
Where it sits
Part 2. Of civil actions / Title 8. Of the trial and judgment in civil actions / Chapter 1. Judgment in General
History
Amended by Stats. 1993, Ch. 456, Sec. 9. Effective January 1, 1994.

This text refers to

Cited in

Every section in Code of Civil Procedure on Aristo · All California law

Public record, quoted from the official source. Not legal advice.

About this page

Aristo publishes these pages free, quoted from the official sources. Its service, Aristo, connects to Claude, ChatGPT or Harvey with one link and gives the AI the assigned judge's record: the department's posted rules word for word and, where the court posts them, the judge's recent tentative rulings and how the judge has ruled on each kind of motion, each with its source and date, so the draft is written for that judge from the record, not from memory. The first week is free at aristolaw.net, with no card.

See it work

The code is half the answer. Your judge is the other half.

The same AI was asked the same question twice. Alone, it answered from memory. With Aristo, it quoted the code word for word, then read the judge's own department page and found the deadline that comes first.

Draft the opening of our opposition to the defense summary judgment motion in a complex wage and hour case before Judge Nancy Fineman in San Mateo, citing the code and the Rules of Court. When is it due?

Your AI aloneFrom memory

The opposition is due at least 20 days before the hearing, counting court days, and the reply at least 11 court days before the hearing (Code Civ. Proc., § 437c, subd. (b)(2), (3)). Confirm the hearing date on the court's docket and check Judge Fineman's department for any standing order shortening or extending that schedule.

Your AI with AristoFrom Aristo's record, with sources

The opposition is due "not less than 20 days preceding the noticed or continued date of hearing"1 (Code Civ. Proc., § 437c, subd. (b)(2)1). Judge Fineman's own department page requires all briefing to be completed at least three (3) weeks before the hearing date2, so her date comes first and is the one to file by. The memorandum may not exceed 20 pages3, and the opposition must include a separate statement responding to each fact the defense claims is undisputed (Cal. Rules of Court, rule 3.1350, subd. (f)4; Code Civ. Proc., § 437c, subd. (b)(3)1). Any written evidentiary objections must be served and filed with the opposition (Cal. Rules of Court, rule 3.1354, subd. (a)5).

  1. 1Code Civ. Proc., § 437c (California Legislature), read November 15, 2026
  2. 2Department 4 (Nancy L. Fineman), read November 12, 2026
  3. 3California Rules of Court: Rule 3.1113. Memorandum, read November 15, 2026
  4. 4California Rules of Court: Rule 3.1350. Motion for summary judgment or summary adjudication, read November 15, 2026
  5. 5California Rules of Court: Rule 3.1354. Written objections to evidence, read November 15, 2026

Aristo gave your AI: 4 of Dept. 4's own rules on summary judgment, word for word · 6 California Rules of Court and 1 code section, word for word

From 12 official sources ·

Both answers recorded from the live service on November 15, 2026, same model, word for word. The paragraph on the deadline, word for word. The receipt covers the whole answer.
Ask your own question