{"record":{"id":"11d3e5bac6d6a1d5","repo":"zed-industries/zed","slug":"missing-connection-file-in-argv-in-kernelspec","errorCode":null,"errorMessage":"Missing 'connection_file' in argv in kernelspec {}","messagePattern":"Missing 'connection_file' in argv in kernelspec (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/repl/src/kernels/native_kernel.rs","lineNumber":49,"sourceCode":"    pub kernelspec: JupyterKernelspec,\n}\n\nimpl PartialEq for LocalKernelSpecification {\n    fn eq(&self, other: &Self) -> bool {\n        self.name == other.name && self.path == other.path\n    }\n}\n\nimpl Eq for LocalKernelSpecification {}\n\nimpl LocalKernelSpecification {\n    #[must_use]\n    fn command(&self, connection_path: &PathBuf) -> Result<std::process::Command> {\n        let argv = &self.kernelspec.argv;\n\n        anyhow::ensure!(!argv.is_empty(), \"Empty argv in kernelspec {}\", self.name);\n        anyhow::ensure!(argv.len() >= 2, \"Invalid argv in kernelspec {}\", self.name);\n        anyhow::ensure!(\n            argv.iter().any(|arg| arg == \"{connection_file}\"),\n            \"Missing 'connection_file' in argv in kernelspec {}\",\n            self.name\n        );\n\n        let mut cmd = util::command::new_std_command(&argv[0]);\n\n        for arg in &argv[1..] {\n            if arg == \"{connection_file}\" {\n                cmd.arg(connection_path);\n            } else {\n                cmd.arg(arg);\n            }\n        }\n\n        if let Some(env) = &self.kernelspec.env {\n            log::info!(\n                \"LocalKernelSpecification: applying env to command: {:?}\",","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/repl/src/kernels/native_kernel.rs#L31-L67","documentation":"Guard in LocalKernelSpecification::command(): the kernelspec argv contains no {connection_file} placeholder. Without it the kernel process would never receive the path to Zed's connection file and could not attach to the session, so command building is rejected.","triggerScenarios":"Thrown at crates/repl/src/kernels/native_kernel.rs:49 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the kernelspec argv to include {connection_file}","Reinstall the kernel package"],"exampleFix":null,"handlingStrategy":"validation","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-14T00:17:10.932Z"}