{"record":{"id":"37d75f0876837e1f","repo":"Hmbown/CodeWhale","slug":"dsh-integration-is-disabled-run-cli-command-en","errorCode":null,"errorMessage":"DSH integration is disabled; run `{CLI_COMMAND} enable` to launch again","messagePattern":"DSH integration is disabled; run `(.+?) enable` to launch again","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/integrations/dsh/mod.rs","lineNumber":684,"sourceCode":"        }\n        out\n    }\n}\n\npub(crate) fn launch_spec(\n    report: &DshStatusReport,\n    profile_override: Option<&str>,\n    extra_args: &[String],\n    workspace: &Path,\n) -> 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    }","sourceCodeStart":666,"sourceCodeEnd":702,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/integrations/dsh/mod.rs#L666-L702","documentation":"launch_spec builds the spec to launch dsh through the integration and first checks report.state.launchable(). Disabled is explicitly not launchable, so this bail fires telling the user to re-enable before launching. It enforces that a user-disabled integration is never launched implicitly.","triggerScenarios":"Calling launch_spec (or anything that launches dsh: connect/update flows, tests, run_dsh) when the connection record has disabled=true, set previously via `codewhale dsh disable`.","commonSituations":"User disabled the integration earlier and forgot; automation attempts to launch dsh while a human disabled it; stale receipt record left disabled from a prior session.","solutions":["Run `codewhale dsh enable` to re-enable the integration, then launch again","Check the receipt record's disabled flag if you believe it should already be enabled","If automation must launch, remove the manual disable from the workflow"],"exampleFix":"// before\ncodewhale dsh run   # fails: integration is disabled\n// after\ncodewhale dsh enable\ncodewhale dsh run","handlingStrategy":"type-guard","validationCode":"let report = dsh_report()?;\nif !report.state.launchable() { eprintln!(\"integration not launchable: {:?}\", report.state); }","typeGuard":"fn is_enabled(state: &DshIntegrationState) -> bool {\n    !matches!(state, DshIntegrationState::Disabled { .. })\n}","tryCatchPattern":"match launch_spec(...) {\n    Err(e) if e.to_string().contains(\"integration is disabled\") => {\n        dsh_enable()?;\n        launch_spec(...)\n    }\n    r => r,\n}","preventionTips":["Run `codewhale dsh enable` after any manual disable","Check the integration state before scripted launches","Keep disable/enable pairs in automation scripts symmetric"],"tags":["dsh-lifecycle","disabled-state","launch"],"backgroundTag":"invalid-state-transition","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"}