Hmbown/CodeWhale · error

DSH is not connected; run `{CLI_COMMAND} connect` first

Error message

DSH is not connected; run `{CLI_COMMAND} connect` first

What it means

`install-bundle` requires an existing connection: after `status_report` and `ensure_launchable_dsh` pass, it reads `report.record` to know the connected identity and profile. When the receipt has no current record this error fires with an explicit `connect` instruction (note the trailing `first`, distinguishing it from the update-path variant). Nothing has been written when it triggers.

Source

Thrown at crates/tui/src/integrations/cli.rs:387

            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_home

View on GitHub (pinned to 8880682c63)

Solutions

  1. Run `codewhale integrations dsh connect` first, then retry install-bundle
  2. Verify state is `connected` via `codewhale integrations dsh status` before installing
  3. In scripts, chain the commands: connect && install-bundle --app web --yes
Defensive patterns

Strategy: validation

Validate before calling

let (_paths, report) = status_report(config, workspace, false)?;
ensure_launchable_dsh(&report)?;
if report.record.is_none() {
    println!("run `codewhale integrations dsh connect` first");
    return Ok(());
}

Type guard

fn ready_for_bundle_install(report: &DshStatusReport) -> bool {
    report.record.is_some()
        && !matches!(report.state, DshIntegrationState::StaleConfig { .. })
        && matches!(report.bundle_availability, dsh::BundleAvailability::Available { .. })
}

Prevention

When it happens

Trigger: Running `codewhale integrations dsh install-bundle` when the integration was never connected, or after `codewhale integrations dsh remove` deleted the receipt. dsh itself is installed and launchable (ensure_launchable_dsh passed) — only the Codewhale connection record is missing.

Common situations: Trying install-bundle as the first command on a fresh machine; scripts running install-bundle after a cleanup step; teammates assuming the bundle step creates the connection too.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@8880682c63 (2026-08-16). Data as JSON: /api/errors/449d57fd61b8d56f. Report an issue: GitHub.