{"record":{"id":"df84658440768f50","repo":"Hmbown/CodeWhale","slug":"dsh-is-offline-reason","errorCode":null,"errorMessage":"dsh is offline: {reason}","messagePattern":"dsh is offline: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/integrations/cli.rs","lineNumber":514,"sourceCode":"                \"  (receipt history is kept at {}; $DSH_HOME is never touched)\",\n                paths.receipt.display()\n            );\n            confirm(yes, \"Remove the DSH integration files?\")?;\n            let removed = dsh::remove(&paths)?;\n            println!(\"removed {} file(s)\", removed.len());\n            Ok(())\n        }\n    }\n}\n\nfn ensure_launchable_dsh(report: &DshStatusReport) -> Result<()> {\n    match &report.state {\n        DshIntegrationState::NotInstalled => {\n            anyhow::bail!(\n                \"dsh is not on PATH; install the official DeepSeek Harness first (npm i -g @deepseek-ai/dsh)\"\n            )\n        }\n        DshIntegrationState::Offline { reason } => anyhow::bail!(\"dsh is offline: {reason}\"),\n        DshIntegrationState::Incompatible { reason, .. } => {\n            anyhow::bail!(\"installed dsh is incompatible with this integration: {reason}\")\n        }\n        _ => Ok(()),\n    }\n}\n","sourceCodeStart":496,"sourceCodeEnd":521,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/8880682c63083a91624de936797efa3ce9e498fd/crates/tui/src/integrations/cli.rs#L496-L521","documentation":"`ensure_launchable_dsh` reports `Offline` when a `dsh` binary exists but could not report a version — the detection probe (`dsh --version` / `--help` via the process runner) failed to spawn or returned nothing usable. `{reason}` carries the underlying spawn/parse error. dsh is present but not executable in practice, so the CLI refuses to plan or launch against it.","triggerScenarios":"connect/update/launch/install-bundle when the dsh shim exists on PATH but is broken: a node shim pointing at a removed Node install, an exec-format mismatch, a truncated script, or `dsh --version` crashing. `{reason}` distinguishes spawn failure from unusful output.","commonSituations":"Upgrading or removing Node while leaving global npm shims behind; installing dsh with a different Node version manager and switching versions; corrupted global npm package; Windows .cmd shims with a broken node association; disk-full truncating the shim script.","solutions":["Run `dsh --version` manually in the same shell — its failure output is the real problem","If the shim is stale, reinstall dsh: `npm i -g @deepseek-ai/dsh` (preferably after fixing the Node install)","Ensure the `node` that dsh's shim references is present and first on PATH","After dsh --version works, re-run the dsh subcommand; state should move to detected/connected"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"let detection = detect_now();\nif matches!(detection.compatibility, dsh::DshCompatibility::Incompatible) {\n    eprintln!(\"dsh is present but unusable; check `dsh --version` output\");\n    return Ok(());\n}","typeGuard":"fn dsh_online(report: &DshStatusReport) -> bool {\n    !matches!(report.state, DshIntegrationState::Offline { .. })\n}","tryCatchPattern":null,"preventionTips":["Run `dsh --version` after every Node or dsh upgrade to catch broken shims early","Reinstall global npm packages when switching Node version managers","Treat any 'shim exists but cannot execute' symptom as an offline dsh, not a missing one"],"tags":["rust","dsh","environment","detection","node"],"backgroundTag":null,"analyzedSha":"8880682c63083a91624de936797efa3ce9e498fd","analyzedAt":"2026-08-16T11:31:27.956Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}