{"record":{"id":"eab7b0f22f1effbd","repo":"zed-industries/zed","slug":"failed-to-send-to-output-writer","errorCode":null,"errorMessage":"Failed to send to output writer","messagePattern":"Failed to send to output writer","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/edit_prediction_cli/src/main.rs","lineNumber":1449,"sourceCode":"                                    false\n                                };\n\n                                let should_write = !failed || args.failed == FailedHandling::Keep;\n                                if should_write {\n                                    if args.markdown {\n                                        let markdown_dir =\n                                            output.as_ref().expect(\"--markdown requires -o\");\n                                        let filename = format!(\"{}.md\", example.spec.filename());\n                                        let path = markdown_dir.join(&filename);\n                                        let markdown = example.spec.to_markdown();\n                                        std::fs::write(&path, &markdown)\n                                            .expect(\"Failed to write markdown file\");\n                                    } else if let Some(ref mut sender) = output_sender.clone() {\n                                        let line = serde_json::to_string(&example).unwrap();\n                                        sender\n                                            .send(line)\n                                            .await\n                                            .expect(\"Failed to send to output writer\");\n                                    } else if args.output.is_none()\n                                        && !matches!(command, Command::Eval(_))\n                                    {\n                                        let line = serde_json::to_string(&example).unwrap();\n                                        println!(\"{}\", line);\n                                    }\n                                }\n                            }\n\n                            let project = repo_examples\n                                .iter()\n                                .find_map(|e| e.state.as_ref().map(|s| s.project.clone()));\n\n                            if let Some(project) = project {\n                                let mut cx = cx.clone();\n\n                                let shutdown_task: Task<()> =\n                                    project.update(&mut cx, |project, cx| {","sourceCodeStart":1431,"sourceCodeEnd":1467,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/edit_prediction_cli/src/main.rs#L1431-L1467","documentation":"Panics when sending an example's serialized line to the output-writer task via the mpsc channel fails — the writer task has shut down (e.g. after a prior write error), so remaining examples cannot be recorded.","triggerScenarios":"Thrown at crates/edit_prediction_cli/src/main.rs:1449 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Look earlier in the log for the writer task's underlying I/O error","Re-run with resume to repopulate the output file","Avoid killing the process mid-write"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}