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

  1. Run the DSH connect flow first: `codewhale connect` (the CLI_COMMAND interpolated in the message).
  2. Verify the connection record exists via the status command (`status_report` shows `record`).
  3. If the record was deleted, reconnect rather than hand-crafting it; then retry `install-bundle`.
  4. 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

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


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_home

View on GitHub (pinned to 73e0f67d83)