Hmbown/CodeWhale · error
DSH is not connected; run
Error message
DSH is not connected; run `{CLI_COMMAND} connect` first What it means
Installing a DSH bundle requires an existing connection record for the DSH integration. `run_dsh` looks up `report.record` after running a status report and throws this error when that record is None, meaning the DSH CLI has never been connected (`connect` was never run or the record was removed). The message embeds the CLI command so the user knows the exact remediation.
Solutions
- Run the DSH connect flow first: `codewhale connect` (the CLI_COMMAND interpolated in the message).
- Verify the connection record exists via the status command (`status_report` shows `record`).
- If the record was deleted, reconnect rather than hand-crafting it; then retry `install-bundle`.
- Ensure you are in the intended workspace — records are workspace-scoped, so connecting in another directory won't help.
Example fix
// before (shell) codewhale install-bundle --app web // after (shell) codewhale connect codewhale install-bundle --app web
Defensive patterns
Strategy: validation
Validate before calling
let (_, report) = status_report(config, workspace, false)?;
if report.record.is_none() {
eprintln!("DSH not connected; run `codewhale connect` first");
return Ok(());
} Prevention
- Always run connect before any dsh subcommand in new environments
- Check integration status before bundle operations
- Script connect as a setup prerequisite in CI
When it happens
Trigger: Calling `run_dsh` with `DshIntegrationCommand::InstallBundle` while `status_report(config, workspace, false)` returns a report whose `record` field is `None` — i.e. the dsh integration is installed/detected but no connection record exists.
Common situations: Fresh machine or new workspace where `codewhale connect` was skipped; the DSH record file was deleted or corrupted; the integration was disabled/reset and the user jumps straight to `install-bundle`.
Understand the failure class
Background: "X is required", "must be set", "cannot be empty": the missing-required-config error family, from Vertex AI project/location to WeChat keys — this error's family across 18 libraries.
Related errors
- --app must be `web` or `headless`, got
- cannot resolve the current Codewhale route
- dsh binary path is unknown
- DSH is not connected; nothing to remove
- DSH is not connected; run
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/449d57fd61b8d56f.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/integrations/cli.rs:404
println!(
"disabled: overlay kept at {}; launches refused",
record.overlay_path.display()
);
Ok(())
}
DshIntegrationCommand::Enable => {
let paths = DshPaths::from_process()?;
let record = dsh::set_disabled(&paths, false)?;
println!("enabled: {}", record.overlay_path.display());
Ok(())
}
DshIntegrationCommand::InstallBundle { app, yes } => {
let app = dsh::DshAppBundle::parse(&app)
.ok_or_else(|| anyhow::anyhow!("--app must be `web` or `headless`, got `{app}`"))?;
let (paths, report) = status_report(config, workspace, false)?;
ensure_launchable_dsh(&report)?;
let record = report.record.as_ref().ok_or_else(|| {
anyhow::anyhow!("DSH is not connected; run `{CLI_COMMAND} connect` first")
})?;
if let dsh::BundleAvailability::NotAvailable { reason } = &report.bundle_availability {
anyhow::bail!("DSH plugin path not available: {reason}");
}
if matches!(report.state, DshIntegrationState::StaleConfig { .. }) {
anyhow::bail!("overlay is stale; run `{CLI_COMMAND} update` before install-bundle");
}
let app_source = dsh::bundle::app_bundle_source(
report
.detection
.binary
.as_ref()
.ok_or_else(|| anyhow::anyhow!("dsh binary path is unknown"))?,
app,
)?;
let profile_dir = report
.detection
.dsh_homeView on GitHub (pinned to 73e0f67d83)