Hmbown/CodeWhale · error · anyhow::Error

dsh is not installed

Error message

dsh is not installed

What it means

launch_spec fails when dsh cannot be found on the system at all: DshIntegrationState::NotInstalled means no dsh binary was detected in PATH or the expected install locations, so there is nothing to launch.

Solutions

  1. Install dsh using the documented install method, then verify with `dsh --version`.
  2. Ensure the dsh binary's directory is on PATH for the environment running Codewhale (check `which dsh`).
  3. Run `codewhale dsh connect` after installation to record identity/receipt before launching.

Example fix

// before
which dsh   # not found

// after
npm i -g dsh && which dsh
codewhale dsh connect
codewhale launch
Defensive patterns

Strategy: validation

Validate before calling

if which("dsh").is_err() {
    eprintln!("dsh not installed; install it and ensure it is on PATH");
    return Err(...);
}

Try / catch

match launch_spec(&report, None, &[], &ws) {
    Err(e) if e.to_string() == "dsh is not installed" => {
        print_install_instructions();
    }
    other => other?,
}

Prevention

When it happens

Trigger: Any launch path through dsh::launch_spec on a machine where dsh was never installed, was uninstalled, or is not on PATH for the current shell/user.

Common situations: Fresh machine or new container; dsh installed via a tool (nvm, cargo, brew) whose PATH is not loaded in the environment running Codewhale; dsh removed during cleanup.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22). Data as JSON: /api/errors/4ae0827533efa366. Report an issue: GitHub.

Appendix: source

Thrown at crates/tui/src/integrations/dsh/mod.rs:697

    })?;
    if !report.state.launchable() {
        match &report.state {
            DshIntegrationState::Connected { .. } | DshIntegrationState::StaleVersion { .. } => {}
            DshIntegrationState::Disabled { .. } => {
                anyhow::bail!(
                    "DSH integration is disabled; run `{CLI_COMMAND} enable` to launch again"
                )
            }
            DshIntegrationState::StaleConfig { reason, .. } => {
                anyhow::bail!(
                    "DSH overlay is stale ({reason}); run `{CLI_COMMAND} update` before launching"
                )
            }
            DshIntegrationState::Incompatible { reason, .. } => {
                anyhow::bail!("installed dsh is incompatible: {reason}")
            }
            DshIntegrationState::Offline { reason } => anyhow::bail!("dsh is offline: {reason}"),
            DshIntegrationState::NotInstalled => anyhow::bail!("dsh is not installed"),
            DshIntegrationState::Detected { .. } => {
                anyhow::bail!("DSH is detected but not connected; run `{CLI_COMMAND} connect`")
            }
        }
    }
    let binary = report
        .detection
        .binary
        .clone()
        .ok_or_else(|| anyhow::anyhow!("dsh binary path is unknown"))?;
    let bundle_installed = record.bundle.is_some();
    let profile = profile_override.unwrap_or(if bundle_installed {
        bundle::BUNDLE_PROFILE
    } else {
        record.profile.as_str()
    });
    if !matches!(profile, "web" | "headless") && profile != bundle::BUNDLE_PROFILE {
        anyhow::bail!(

View on GitHub (pinned to 73e0f67d83)