{"record":{"id":"4ae0827533efa366","repo":"Hmbown/CodeWhale","slug":"dsh-is-not-installed","errorCode":null,"errorMessage":"dsh is not installed","messagePattern":"dsh is not installed","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/integrations/dsh/mod.rs","lineNumber":697,"sourceCode":"    })?;\n    if !report.state.launchable() {\n        match &report.state {\n            DshIntegrationState::Connected { .. } | DshIntegrationState::StaleVersion { .. } => {}\n            DshIntegrationState::Disabled { .. } => {\n                anyhow::bail!(\n                    \"DSH integration is disabled; run `{CLI_COMMAND} enable` to launch again\"\n                )\n            }\n            DshIntegrationState::StaleConfig { reason, .. } => {\n                anyhow::bail!(\n                    \"DSH overlay is stale ({reason}); run `{CLI_COMMAND} update` before launching\"\n                )\n            }\n            DshIntegrationState::Incompatible { reason, .. } => {\n                anyhow::bail!(\"installed dsh is incompatible: {reason}\")\n            }\n            DshIntegrationState::Offline { reason } => anyhow::bail!(\"dsh is offline: {reason}\"),\n            DshIntegrationState::NotInstalled => anyhow::bail!(\"dsh is not installed\"),\n            DshIntegrationState::Detected { .. } => {\n                anyhow::bail!(\"DSH is detected but not connected; run `{CLI_COMMAND} connect`\")\n            }\n        }\n    }\n    let binary = report\n        .detection\n        .binary\n        .clone()\n        .ok_or_else(|| anyhow::anyhow!(\"dsh binary path is unknown\"))?;\n    let bundle_installed = record.bundle.is_some();\n    let profile = profile_override.unwrap_or(if bundle_installed {\n        bundle::BUNDLE_PROFILE\n    } else {\n        record.profile.as_str()\n    });\n    if !matches!(profile, \"web\" | \"headless\") && profile != bundle::BUNDLE_PROFILE {\n        anyhow::bail!(","sourceCodeStart":679,"sourceCodeEnd":715,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/integrations/dsh/mod.rs#L679-L715","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Install dsh using the documented install method, then verify with `dsh --version`.","Ensure the dsh binary's directory is on PATH for the environment running Codewhale (check `which dsh`).","Run `codewhale dsh connect` after installation to record identity/receipt before launching."],"exampleFix":"// before\nwhich dsh   # not found\n\n// after\nnpm i -g dsh && which dsh\ncodewhale dsh connect\ncodewhale launch","handlingStrategy":"validation","validationCode":"if which(\"dsh\").is_err() {\n    eprintln!(\"dsh not installed; install it and ensure it is on PATH\");\n    return Err(...);\n}","typeGuard":null,"tryCatchPattern":"match launch_spec(&report, None, &[], &ws) {\n    Err(e) if e.to_string() == \"dsh is not installed\" => {\n        print_install_instructions();\n    }\n    other => other?,\n}","preventionTips":["Install dsh before installing Codewhale integrations.","In containers/CI, explicitly install dsh in the image.","Verify `which dsh` inside the same shell environment that runs Codewhale."],"tags":["dsh","not-installed","binary","path"],"backgroundTag":"command-not-found","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}