zed-industries/zed · error
Failed to open failed.jsonl
Error message
Failed to open failed.jsonl
What it means
A panic in the edit-prediction CLI's failure-recording path: opening failed.jsonl in the run directory for append fails (missing RUN_DIR, permissions). The record of the failed example cannot be persisted, so the CLI aborts.
Source
Thrown at crates/edit_prediction_cli/src/main.rs:1662
.write(
&failed_example_path,
&serde_json::to_vec_pretty(&example).unwrap(),
)
.await
.unwrap();
let err_path = FAILED_EXAMPLES_DIR.join(format!("{}_err.txt", example_name));
app_state
.fs
.write(&err_path, format!("{error:?}").as_bytes())
.await
.unwrap();
let failed_jsonl_path = RUN_DIR.join("failed.jsonl");
let mut file = OpenOptions::new()
.create(true)
.append(true)
.open(&failed_jsonl_path)
.expect("Failed to open failed.jsonl");
writeln!(file, "{}", serde_json::to_string(example).unwrap())
.expect("Failed to write to failed.jsonl");
let cursor_path = match example.repo_name() {
Ok(repo_name) => repo_name.worktree_path().join(&example.spec.cursor_path),
Err(_) => example.spec.cursor_path.as_ref().to_path_buf(),
};
msg = format!(
indoc::indoc! {"
While processing \"{}\":
\x1b[31m{:?}\x1b[0m
Example: \x1b[36m{}\x1b[0m
Error file: \x1b[36m{}\x1b[0m
Cursor file: \x1b[36m{}\x1b[0m
Re-run: cargo run -p edit_prediction_cli -- {} \x1b[36m{}\x1b[0m
"},View on GitHub (pinned to f4178619ac)
Solutions
- Verify RUN_DIR exists and is writable (it is created at run start)
- Check disk space and permissions in the run directory
- Re-create the run directory if it was deleted mid-run
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at crates/edit_prediction_cli/src/main.rs:1662 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/56666dcc45f08ac7.
Report an issue: GitHub.