Hmbown/CodeWhale · error
--cloud is required in --non-interactive mode. {}
Error message
--cloud is required in --non-interactive mode. {} What it means
The remote setup wizard resolves its cloud target from the --cloud flag, an interactive prompt, or fails. In --non-interactive mode there is no prompt fallback, so if --cloud was not supplied resolution aborts immediately. The message includes the list of valid cloud slugs to make the fix mechanical.
Source
Thrown at crates/tui/src/remote_setup/mod.rs:149
use crate::palette;
use colored::Colorize;
let (r, g, b) = palette::WHALE_INFO_RGB;
println!("{}", "Codewhale Remote Setup".truecolor(r, g, b).bold());
println!("{}", "======================".truecolor(r, g, b));
println!("Generate a deploy bundle for a remote Codewhale agent (cloud + chat bridge).");
}
// ---------------------------------------------------------------------------
// Resolution: flag -> prompt (unless --non-interactive) -> validated value
// ---------------------------------------------------------------------------
fn resolve_cloud(args: &RemoteSetupArgs) -> Result<&'static CloudTarget> {
if let Some(slug) = &args.cloud {
return registry::cloud_by_slug(slug)
.ok_or_else(|| anyhow::anyhow!("unknown cloud '{slug}'. {}", cloud_choices()));
}
if args.non_interactive {
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()));View on GitHub (pinned to 0c42157ee5)
Solutions
- Add --cloud <slug> to the command, using one of the slugs listed in the error message (rendered by cloud_choices()).
- Re-run without --non-interactive to get the interactive cloud picker if you do not know the slug.
- Pin the exact slug in your automation config so CI does not depend on prompt defaults.
Example fix
# before codewhale remote-setup --non-interactive --bridge ... # fails: --cloud is required in --non-interactive mode # after codewhale remote-setup --non-interactive --cloud <slug> --bridge ...
Defensive patterns
Strategy: validation
Validate before calling
# Shell: require the flag before invoking non-interactive setup
: "${CODEWHALE_CLOUD:?--cloud is required in --non-interactive mode; set CODEWHALE_CLOUD}"
codewhale remote-setup --non-interactive --cloud "$CODEWHALE_CLOUD" --bridge ... --provider ... Prevention
- In automation, always pass --cloud, --bridge, and --provider together with --non-interactive.
- Fail fast in your wrapper script (e.g. parameter expansion checks) before spawning the CLI.
- Pin slugs in version-controlled config so flag requirements are caught in review, not at runtime.
When it happens
Trigger: Running remote setup with --non-interactive but without --cloud; or passing a slug that is not in CLOUD_TARGETS (that case produces the separate 'unknown cloud' error). Resolution happens in resolve_cloud in crates/tui/src/remote_setup/mod.rs before anything is provisioned.
Common situations: CI or provisioning scripts adopt the non-interactive flag but were written against an older CLI that prompted or defaulted; copy-pasted command lines from docs that omit the cloud flag; new environments where no default cloud exists.
Related errors
- --bridge is required in --non-interactive mode. {}
- --provider is required in --non-interactive mode. Known: {}
- The Codewhale service returned an unexpectedly large respons
- Codewhale account login timed out; run `codewhale account lo
- The Codewhale service returned an account without an ID
AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20).
Data as JSON: /api/errors/404086d8a5b35f6d.
Report an issue: GitHub.