zed-industries/zed · error · anyhow::Error

no remote client

Error message

no remote client

What it means

Generic sentinel guard in SshRunningKernel::new(): the SSH remote client handle was unavailable when setting up the kernel's connection info and port forwards, so the SSH kernel cannot be started. It signals missing infrastructure rather than bad user input.

Source

Thrown at crates/repl/src/kernels/ssh_kernel.rs:114

            let remote_stdin_port = connection_info["stdin_port"]
                .as_u64()
                .context("missing stdin_port")? as u16;
            let remote_control_port = connection_info["control_port"]
                .as_u64()
                .context("missing control_port")? as u16;
            let remote_hb_port = connection_info["hb_port"]
                .as_u64()
                .context("missing hb_port")? as u16;

            let forwards = vec![
                (local_ports[0], "127.0.0.1".to_string(), remote_shell_port),
                (local_ports[1], "127.0.0.1".to_string(), remote_iopub_port),
                (local_ports[2], "127.0.0.1".to_string(), remote_stdin_port),
                (local_ports[3], "127.0.0.1".to_string(), remote_control_port),
                (local_ports[4], "127.0.0.1".to_string(), remote_hb_port),
            ];

            let remote_client = remote_client.ok_or_else(|| anyhow::anyhow!("no remote client"))?;
            let command_template = cx.update(|_window, cx| {
                remote_client.read(cx).build_forward_ports_command(forwards)
            })??;

            let mut command = util::command::new_command(&command_template.program);
            command.args(&command_template.args);
            command.envs(&command_template.env);

            let mut ssh_tunnel_process = command.spawn().context("failed to spawn ssh tunnel")?;

            let stderr = ssh_tunnel_process.stderr.take();
            cx.spawn(async move |_cx| {
                if let Some(stderr) = stderr {
                    let reader = BufReader::new(stderr);
                    let mut lines = reader.lines();
                    while let Some(Ok(line)) = lines.next().await {
                        log::warn!("ssh tunnel stderr: {}", line);
                    }

View on GitHub (pinned to f4178619ac)

Solutions

  1. Open the notebook over an SSH remote project
  2. Reconnect the SSH project before starting the kernel
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at crates/repl/src/kernels/ssh_kernel.rs:114 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/503129da97be8666. Report an issue: GitHub.