{"record":{"id":"449d57fd61b8d56f","repo":"Hmbown/CodeWhale","slug":"dsh-is-not-connected-run-cli-command-connect-449d57","errorCode":null,"errorMessage":"DSH is not connected; run `{CLI_COMMAND} connect` first","messagePattern":"DSH is not connected; run `(.+?) connect` first","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/integrations/cli.rs","lineNumber":404,"sourceCode":"            println!(\n                \"disabled: overlay kept at {}; launches refused\",\n                record.overlay_path.display()\n            );\n            Ok(())\n        }\n        DshIntegrationCommand::Enable => {\n            let paths = DshPaths::from_process()?;\n            let record = dsh::set_disabled(&paths, false)?;\n            println!(\"enabled: {}\", record.overlay_path.display());\n            Ok(())\n        }\n        DshIntegrationCommand::InstallBundle { app, yes } => {\n            let app = dsh::DshAppBundle::parse(&app)\n                .ok_or_else(|| anyhow::anyhow!(\"--app must be `web` or `headless`, got `{app}`\"))?;\n            let (paths, report) = status_report(config, workspace, false)?;\n            ensure_launchable_dsh(&report)?;\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 let dsh::BundleAvailability::NotAvailable { reason } = &report.bundle_availability {\n                anyhow::bail!(\"DSH plugin path not available: {reason}\");\n            }\n            if matches!(report.state, DshIntegrationState::StaleConfig { .. }) {\n                anyhow::bail!(\"overlay is stale; run `{CLI_COMMAND} update` before install-bundle\");\n            }\n            let app_source = dsh::bundle::app_bundle_source(\n                report\n                    .detection\n                    .binary\n                    .as_ref()\n                    .ok_or_else(|| anyhow::anyhow!(\"dsh binary path is unknown\"))?,\n                app,\n            )?;\n            let profile_dir = report\n                .detection\n                .dsh_home","sourceCodeStart":386,"sourceCodeEnd":422,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/integrations/cli.rs#L386-L422","documentation":"Installing a DSH bundle requires an existing connection record for the DSH integration. `run_dsh` looks up `report.record` after running a status report and throws this error when that record is None, meaning the DSH CLI has never been connected (`connect` was never run or the record was removed). The message embeds the CLI command so the user knows the exact remediation.","triggerScenarios":"Calling `run_dsh` with `DshIntegrationCommand::InstallBundle` while `status_report(config, workspace, false)` returns a report whose `record` field is `None` — i.e. the dsh integration is installed/detected but no connection record exists.","commonSituations":"Fresh machine or new workspace where `codewhale connect` was skipped; the DSH record file was deleted or corrupted; the integration was disabled/reset and the user jumps straight to `install-bundle`.","solutions":["Run the DSH connect flow first: `codewhale connect` (the CLI_COMMAND interpolated in the message).","Verify the connection record exists via the status command (`status_report` shows `record`).","If the record was deleted, reconnect rather than hand-crafting it; then retry `install-bundle`.","Ensure you are in the intended workspace — records are workspace-scoped, so connecting in another directory won't help."],"exampleFix":"// before (shell)\ncodewhale install-bundle --app web\n// after (shell)\ncodewhale connect\ncodewhale install-bundle --app web","handlingStrategy":"validation","validationCode":"let (_, report) = status_report(config, workspace, false)?;\nif report.record.is_none() {\n    eprintln!(\"DSH not connected; run `codewhale connect` first\");\n    return Ok(());\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always run connect before any dsh subcommand in new environments","Check integration status before bundle operations","Script connect as a setup prerequisite in CI"],"tags":["cli","dsh","missing-connection"],"backgroundTag":"missing-required-config","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"}