Hmbown/CodeWhale · error

dsh is not on PATH; install the official DeepSeek Harness…

Error message

dsh is not on PATH; install the official DeepSeek Harness first (npm i -g @deepseek-ai/dsh)

What it means

Thrown by `ensure_launchable_dsh` when the DSH status report's state is `NotInstalled`, meaning the `dsh` binary could not be found on PATH. The Codewhale DSH integration depends on the official DeepSeek Harness CLI being installed first, so it fails loudly with install instructions.

Solutions

  1. Install the official harness: `npm i -g @deepseek-ai/dsh`
  2. Fix PATH so the npm global bin directory is included (e.g. after switching node versions)
  3. Verify with `which dsh` / `dsh --version` before re-running the Codewhale command

Example fix

// before
$ codewhale dsh connect
error: dsh is not on PATH...
// after
$ npm i -g @deepseek-ai/dsh
$ codewhale dsh connect
Defensive patterns

Strategy: fallback

Validate before calling

// shell preflight
command -v dsh >/dev/null 2>&1 || { echo "dsh missing; run npm i -g @deepseek-ai/dsh"; exit 1; }

Try / catch

match result {
    Err(e) if e.to_string().contains("dsh is not on PATH") => /* install dsh or fix PATH, then retry */,
    other => return other,
}

Prevention

When it happens

Trigger: Running any `dsh` subcommand that requires launching dsh (connect, install-bundle, etc.) when `report.state == NotInstalled` — dsh is absent from PATH.

Common situations: Fresh machine or container without the npm global package; dsh installed under a user/node-version not on the current PATH; nvm/fnm switching changed the global bin directory; typo'd PATH in CI.

Understand the failure class

Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.

Related errors


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

Appendix: source

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

                    println!("  {}", path.display());
                }
            }
            println!(
                "  (receipt history is kept at {}; $DSH_HOME is never touched)",
                paths.receipt.display()
            );
            confirm(yes, "Remove the DSH integration files?")?;
            let removed = dsh::remove(&paths)?;
            println!("removed {} file(s)", removed.len());
            Ok(())
        }
    }
}

fn ensure_launchable_dsh(report: &DshStatusReport) -> Result<()> {
    match &report.state {
        DshIntegrationState::NotInstalled => {
            anyhow::bail!(
                "dsh is not on PATH; install the official DeepSeek Harness first (npm i -g @deepseek-ai/dsh)"
            )
        }
        DshIntegrationState::Offline { reason } => anyhow::bail!("dsh is offline: {reason}"),
        DshIntegrationState::Incompatible { reason, .. } => {
            anyhow::bail!("installed dsh is incompatible with this integration: {reason}")
        }
        _ => Ok(()),
    }
}

View on GitHub (pinned to 73e0f67d83)