zed-industries/zed · error
Failed to flush output file
Error message
Failed to flush output file
What it means
Panics when the final flush of the buffered output writer fails at the end of the CLI's resume rewrite — buffered data could not be committed to disk (disk full or I/O error), risking loss of the rewritten examples file.
Source
Thrown at crates/edit_prediction_cli/src/main.rs:1072
let total = examples.len();
let already_processed = kept_hashes.len();
eprintln!(
"Resuming: {}/{} examples already processed",
already_processed, total
);
let file = OpenOptions::new()
.write(true)
.truncate(true)
.open(path)
.expect("Failed to open output file for rewriting");
let mut writer = BufWriter::new(file);
for line in &kept_lines {
writeln!(writer, "{}", line).expect("Failed to write to output file");
}
writer.flush().expect("Failed to flush output file");
examples.retain(|e| !kept_hashes.contains(&spec_hash(&e.spec)));
}
fn main() {
let args = EpArgs::parse();
if args.printenv {
::util::shell_env::print_env();
return;
}
let output = args.output_path();
if args.markdown && output.is_none() {
eprintln!("--markdown requires -o to specify the output directory");
std::process::exit(1);
}View on GitHub (pinned to f4178619ac)
Solutions
- Free disk space and re-run the command
- Check the output filesystem for errors (dmesg, fsck)
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at crates/edit_prediction_cli/src/main.rs:1072 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/e6e5a42cc1cdaab3.
Report an issue: GitHub.