zed-industries/zed · error

Failed to create markdown output directory

Error message

Failed to create markdown output directory

What it means

A panic in the edit-prediction CLI when --markdown mode is enabled and create_dir_all on the output directory fails (e.g. permission denied or a file exists at that path). The markdown reports cannot be written, so the run aborts.

Source

Thrown at crates/edit_prediction_cli/src/main.rs:1252

                        }
                    }
                    Command::Qa(args) => {
                        qa::sync_batches(args).await?;
                    }
                    Command::Repair(args) => {
                        repair::sync_batches(args).await?;
                    }
                    _ => (),
                }

                let failfast_on_single_example = examples.len() == 1;

                // For --markdown mode, create the output directory if it doesn't exist
                if args.markdown {
                    let dir = output.as_ref().expect("--markdown requires -o");
                    if !dir.exists() {
                        std::fs::create_dir_all(dir)
                            .expect("Failed to create markdown output directory");
                    }
                }

                // Set up JSONL output writer (not used in markdown mode)
                let mut output_sender: Option<mpsc::UnboundedSender<String>> = None;
                let mut in_place_temp_path: Option<PathBuf> = None;
                if !args.markdown
                    && let Some(output_path) = output.as_ref()
                {
                    let write_path = if args.in_place {
                        let temp = output_path.with_extension("jsonl.tmp");
                        in_place_temp_path = Some(temp.clone());
                        temp
                    } else {
                        output_path.clone()
                    };

                    let file = OpenOptions::new()

View on GitHub (pinned to f4178619ac)

Solutions

  1. Ensure the `-o` path's parent is writable and not an existing file
  2. Use a different output directory
  3. Check filesystem permissions or disk errors
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at crates/edit_prediction_cli/src/main.rs:1252 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20). Data as JSON: /api/errors/f09c43852399dbd8. Report an issue: GitHub.