Under Penal Code section 861, an accused is entitled to a continuous preliminary hearing, unless he agrees to continue the preliminary hearing once it has started, or the magistrate makes a finding of good cause for continuance, as shown by affidavit. The remedy for the violation of this one-session rule is dismissal of the complaint. The record reflected that at the end of the first day of the preliminary hearing, defendant agreed to a continuance to a date certain. On that date, the prison authorities failed to deliver defendant and the matter was eventually continued for eight days over the objection of the defense. Although the record also reflected that the prosecuting attorney had been hospitalized, the appellate court determined that under the totality of the circumstances, as clarified in Stroud v. Superior Court (2000) 23 Cal.4th 952, the actual reason for the delay was the failure of the authorities to produce appellant for the hearing and that this did not constitute good cause under the meaning of the statute. Appellants petition for writ of mandate was granted with direction to dismiss the information.