Hmbown/CodeWhale · error
--bridge is required in --non-interactive mode. {}
Error message
--bridge is required in --non-interactive mode. {} What it means
The remote setup wizard resolves the chat bridge from the --bridge flag, an interactive prompt, or fails. With --non-interactive there is no prompt, so a missing --bridge aborts before provisioning. The error text appends the valid bridge slugs (bridge_choices()) so the correct value can be supplied without reading source.
Source
Thrown at crates/tui/src/remote_setup/mod.rs:170
);
}
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> {
if let Some(slug) = &args.provider {
return ProviderInfo::from_slug(slug).ok_or_else(|| {
anyhow::anyhow!(View on GitHub (pinned to 0c42157ee5)
Solutions
- Add --bridge <slug> using one of the slugs listed in the error message.
- Drop --non-interactive to get the interactive bridge picker when unsure which slug applies.
- Store the chosen bridge slug next to the cloud slug in your provisioning configuration so both are always supplied together.
Example fix
# before codewhale remote-setup --non-interactive --cloud <slug> # fails: --bridge is required in --non-interactive mode # after codewhale remote-setup --non-interactive --cloud <slug> --bridge <slug>
Defensive patterns
Strategy: validation
Validate before calling
# Shell: require the bridge flag alongside --non-interactive
: "${CODEWHALE_BRIDGE:?--bridge is required in --non-interactive mode; set CODEWHALE_BRIDGE}"
codewhale remote-setup --non-interactive --cloud "$CODEWHALE_CLOUD" --bridge "$CODEWHALE_BRIDGE" --provider "$CODEWHALE_PROVIDER" Prevention
- Bundle cloud, bridge, and provider into one required-flags check in provisioning scripts.
- Run the interactive wizard once to discover valid slugs, then codify them.
- Re-verify slugs after upgrading Codewhale, since registries can change between versions.
When it happens
Trigger: Running remote setup with --non-interactive but no --bridge argument in resolve_bridge (crates/tui/src/remote_setup/mod.rs). Supplying an unknown slug raises the distinct 'unknown bridge' error instead.
Common situations: Automation scripts that pass --cloud and --provider but were never updated for the bridge flag; environments cloned from an example that predates bridge selection; users who assume a default bridge exists.
Related errors
- --cloud is required in --non-interactive mode. {}
- --provider is required in --non-interactive mode. Known: {}
- external credential consent was not saved: non-interactive u
- unknown field '{field_key}' for built-in provider '{provider
- unknown field '{field_key}' for custom provider '{provider_i
AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20).
Data as JSON: /api/errors/b1694c3c8145d5a0.
Report an issue: GitHub.