{"record":{"id":"6c88cb890c7baa50","repo":"Hmbown/CodeWhale","slug":"installed-dsh-is-incompatible-reason","errorCode":null,"errorMessage":"installed dsh is incompatible: {reason}","messagePattern":"installed dsh is incompatible: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/integrations/dsh/mod.rs","lineNumber":694,"sourceCode":") -> Result<LaunchSpec> {\n    let record = report.record.as_ref().ok_or_else(|| {\n        anyhow::anyhow!(\"DSH is not connected; run `{CLI_COMMAND} connect` first\")\n    })?;\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()","sourceCodeStart":676,"sourceCodeEnd":712,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/integrations/dsh/mod.rs#L676-L712","documentation":"launch_spec refuses to build a dsh launch when the integration state is Incompatible. The installed dsh client binary fails a compatibility check (e.g. its reported version or capabilities do not match what Codewhale's DSH integration expects), so launching would produce undefined behavior. The error carries the specific `reason` from the detection/status layer.","triggerScenarios":"Calling `codewhale launch` (or any command that goes through dsh::launch_spec) after `dsh status`/detection classified the integration as DshIntegrationState::Incompatible — typically because the installed dsh version is too old, too new, or built with unexpected capabilities.","commonSituations":"dsh was upgraded or downgraded outside Codewhale; a distro-package or npm-global install replaced a version Codewhale pinned; a beta/nightly dsh build reports a version string the integration cannot parse or accept.","solutions":["Read the `{reason}` in the message and install a dsh version compatible with this Codewhale build (see the version constraints in the DSH integration docs).","Run `codewhale dsh status` to re-detect and confirm the current state and reported dsh version.","Reinstall dsh via the documented channel (e.g. the install command Codewhale recommends), then re-run `codewhale dsh connect` if needed.","Upgrade Codewhale itself if a newer dsh is intentionally installed and the incompatibility is a version-skew on Codewhale's side."],"exampleFix":"// before: launching with an incompatible dsh on PATH\n$ codewhale launch\nError: installed dsh is incompatible: dsh 0.4.0 < required 0.5.0\n\n// after: pin a compatible dsh\n$ dsh --version && npm i -g dsh@0.5\n$ codewhale dsh status   # should no longer report Incompatible\n$ codewhale launch","handlingStrategy":"validation","validationCode":"let status = codewhale_dsh_status()?;\nif matches!(status.state, DshIntegrationState::Incompatible { .. }) {\n    eprintln!(\"dsh incompatible; upgrade dsh before launching\");\n    return Err(...);\n}\nlaunch_spec(&status, profile_override, extra_args, workspace)?;","typeGuard":"fn is_launchable(state: &DshIntegrationState) -> bool {\n    matches!(state, DshIntegrationState::Connected { .. } | DshIntegrationState::StaleVersion { .. })\n}","tryCatchPattern":"match launch_spec(&report, None, &[], &ws) {\n    Err(e) if e.to_string().starts_with(\"installed dsh is incompatible\") => {\n        prompt_dsh_upgrade(&report.state);\n    }\n    other => other?,\n}","preventionTips":["Pin the dsh version Codewhale expects in install scripts.","Run `codewhale dsh status` as a preflight before launches.","Upgrade Codewhale and dsh together."],"tags":["dsh","version-incompatibility","launch"],"backgroundTag":"version-incompatible","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"}