Hmbown/CodeWhale · error
unknown bridge ' '.
Error message
unknown bridge '{slug}'. {} What it means
resolve_bridge resolves the --bridge flag through registry::bridge_by_slug and throws with the list of valid bridge choices when the slug is unknown. Like resolve_cloud, it is the first-line validation of the remote setup flags.
Solutions
- Use a slug from the bridge_choices() list printed with the error
- Omit --bridge to pick interactively (unless --non-interactive)
- Verify available slugs in the registry/help output
- Update tooling to current slug names after upgrades
Example fix
// before codewhale remote-setup --bridge taisl // after codewhale remote-setup --bridge tailscale
Defensive patterns
Strategy: validation
Validate before calling
let slug = args.bridge.as_deref().unwrap_or("");
if registry::bridge_by_slug(slug).is_none() {
eprintln!("--bridge must be one of: {}", BRIDGE_CHOICES.join(", "));
std::process::exit(2);
} Try / catch
if let Err(e) = run_remote_setup(args) {
if e.to_string().starts_with("unknown bridge") {
eprintln!("{e}");
std::process::exit(2);
}
return Err(e);
} Prevention
- Validate --bridge against bridge_choices() before invoking
- Keep deployment scripts in sync with registry slug names
- Prefer interactive selection for one-off setups
- Pin script inputs to documented slugs and assert them early
When it happens
Trigger: Running remote setup with `--bridge <slug>` where slug is misspelled, stale, or absent from BRIDGES registry.
Common situations: Typos, renamed bridge slugs in a newer version, or scripts written against a different installation.
Understand the failure class
Background: "Unknown argument", "Invalid value", and "must be one of": invalid CLI argument errors explained — this error's family across 35 libraries.
Related errors
- unknown cloud ' '.
- unknown provider ' '. Known
- A positive pull request number is required
- API key contains invalid control characters
- API key id must be lowercase hex characters — the part…
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/b91855c46ba1084b.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/remote_setup/mod.rs:167
bail!(
"--cloud is required in --non-interactive mode. {}",
cloud_choices()
);
}
let idx = prompt_choice(
"Cloud target",
&CLOUD_TARGETS
.iter()
.map(|c| format!("{} ({})", c.display, c.slug))
.collect::<Vec<_>>(),
)?;
Ok(&CLOUD_TARGETS[idx])
}
fn resolve_bridge(args: &RemoteSetupArgs) -> Result<&'static BridgeSpec> {
if let Some(slug) = &args.bridge {
return registry::bridge_by_slug(slug)
.ok_or_else(|| anyhow::anyhow!("unknown bridge '{slug}'. {}", bridge_choices()));
}
if args.non_interactive {
bail!(
"--bridge is required in --non-interactive mode. {}",
bridge_choices()
);
}
let idx = prompt_choice(
"Chat bridge",
&BRIDGES
.iter()
.map(|b| format!("{} ({})", b.display, b.slug))
.collect::<Vec<_>>(),
)?;
Ok(&BRIDGES[idx])
}
fn resolve_provider(args: &RemoteSetupArgs) -> Result<ProviderInfo> {View on GitHub (pinned to 73e0f67d83)