zed-industries/zed · error
cannot open multiple different remote connections
Error message
cannot open multiple different remote connections
What it means
Raised in parse_ssh_file_path (or the surrounding open-request parser) when the request already references a different remote host/connection. Zed can only open files over one remote connection per request; a second, different connection is rejected.
Source
Thrown at crates/zed/src/zed/open_listener.rs:313
let username = if url.username().is_empty() {
None
} else {
Some(urlencoding::decode(url.username())?.into_owned())
};
let port = url.port();
anyhow::ensure!(
self.open_paths.is_empty(),
"cannot open both local and ssh paths"
);
let mut connection_options =
RemoteSettings::get_global(cx).connection_options_for(host, port, username);
if let Some(password) = url.password() {
connection_options.password = Some(urlencoding::decode(password)?.into_owned());
}
let connection_options = RemoteConnectionOptions::Ssh(connection_options);
if let Some(ssh_connection) = &self.remote_connection {
anyhow::ensure!(
*ssh_connection == connection_options,
"cannot open multiple different remote connections"
);
}
self.remote_connection = Some(connection_options);
self.parse_file_path(url.path());
Ok(())
}
}
fn parse_ssh_url(url: &str) -> Result<url::Url> {
if let Ok(url) = url::Url::parse(url) {
return Ok(url);
}
// SCP/git style urls use ':' to separate from Authority and Path.
// They are unsupported by Url::parse, but can be normalized into a Url.
// SCPUrl("ssh://user@host:~/relpath") => Url("ssh://user@host/~/relpath")
// SCPUrl("ssh://user@host:/abs/path") => Url("ssh://user@host/abs/path")View on GitHub (pinned to f4178619ac)
Solutions
- Open each SSH host in its own window/session
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/zed/src/zed/open_listener.rs:313 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/b711b098d4c5bf1d.
Report an issue: GitHub.