{"record":{"id":"3d60c7154e9297cf","repo":"Hmbown/CodeWhale","slug":"dsh-is-not-connected-run-cli-command-connect-3d60c7","errorCode":null,"errorMessage":"DSH is not connected; run `{CLI_COMMAND} connect`","messagePattern":"DSH is not connected; run `(.+?) connect`","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/integrations/cli.rs","lineNumber":339,"sourceCode":"            println!(\n                \"connected: {} (sha256 {})\",\n                record.overlay_path.display(),\n                record.overlay_sha256\n            );\n            println!(\"receipt: {}\", paths.receipt.display());\n            Ok(())\n        }\n        DshIntegrationCommand::Update {\n            profile,\n            allow_full_access,\n            skin,\n            ocean,\n            yes,\n        } => {\n            let (paths, report) = status_report(config, workspace, allow_full_access)?;\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`\")\n            })?;\n            let profile = profile.unwrap_or_else(|| record.profile.clone());\n            let skin = skin.unwrap_or(record.skin_enabled);\n            let ocean = ocean.unwrap_or(record.ocean_enabled);\n            let identity = dsh::codewhale_route_identity(config, workspace)\n                .map_err(|e| anyhow::anyhow!(\"cannot resolve the current Codewhale route: {e}\"))?;\n            let plan = dsh::plan(\n                &paths,\n                &report.detection,\n                &identity,\n                &profile,\n                allow_full_access,\n                skin,\n                ocean,\n            )?;\n            print_plan(&plan, \"update\");\n            confirm(yes, \"Rewrite the Codewhale overlay for DSH?\")?;\n            let record =","sourceCodeStart":321,"sourceCodeEnd":357,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/integrations/cli.rs#L321-L357","documentation":"The `dsh disconnect` path requires an existing DSH connection record, but status_report returned none. This is an expected, user-facing precondition check: you cannot disconnect what was never connected.","triggerScenarios":"Running the dsh disconnect/update-of-record command when report.record is None — i.e. no DSH overlay/connection was previously established for this workspace.","commonSituations":"Running disconnect on a fresh machine or workspace; the overlay file was deleted manually; disconnecting twice in a row.","solutions":["Run `<CLI_COMMAND> connect` first to establish the DSH connection.","If you believe it is connected, check status_report output / the overlay path for the workspace.","Nothing to do if disconnect was invoked speculatively — the state is already disconnected."],"exampleFix":"// before\ncodewhale dsh disconnect   # no record\n\n// after\ncodewhale dsh connect\ncodewhale dsh disconnect","handlingStrategy":"validation","validationCode":"let (_, report) = status_report(config, workspace, allow_full_access)?;\nif report.record.is_none() {\n    eprintln!(\"DSH is not connected; skipping disconnect\");\n    return Ok(());\n}","typeGuard":null,"tryCatchPattern":"// Rust\nif let Some(record) = report.record.as_ref() {\n    proceed(record);\n} else {\n    eprintln!(\"run `codewhale dsh connect` first\");\n}","preventionTips":["Check `dsh status` before running disconnect.","Don't delete the DSH overlay file manually; use the CLI to disconnect.","Make disconnect idempotent in scripts (ignore the not-connected case)."],"tags":["dsh","cli","state"],"backgroundTag":"record-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"}