{"record":{"id":"3fd2c555e064b724","repo":"Hmbown/CodeWhale","slug":"no-bundle-is-installed-3fd2c5","errorCode":null,"errorMessage":"no bundle is installed","messagePattern":"no bundle is installed","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/integrations/cli.rs","lineNumber":480,"sourceCode":"                \"installed: {} {} into {} (patch sha256 {})\",\n                bundle.package_name,\n                bundle.package_version,\n                bundle.profile_dir.display(),\n                bundle.patch_sha256\n            );\n            println!(\n                \"launch without --patch: dsh --profile {}  (or `{CLI_COMMAND} launch`)\",\n                dsh::bundle::BUNDLE_PROFILE\n            );\n            Ok(())\n        }\n        DshIntegrationCommand::RemoveBundle { yes } => {\n            let (paths, report) = status_report(config, workspace, false)?;\n            let bundle = report\n                .record\n                .as_ref()\n                .and_then(|r| r.bundle.as_ref())\n                .ok_or_else(|| anyhow::anyhow!(\"no bundle is installed\"))?;\n            println!(\n                \"remove-bundle will run: dsh plugin --profile {} remove {}\",\n                bundle.profile, bundle.package_name\n            );\n            println!(\"  then delete only {}\", paths.bundle_dir.display());\n            println!(\n                \"  the DSH profile dir {} and its app bundle link stay in place (DSH-owned)\",\n                bundle.profile_dir.display()\n            );\n            confirm(\n                yes,\n                \"Remove the Codewhale bundle from DSH profile `codewhale`?\",\n            )?;\n            let removed = dsh::remove_bundle(&paths, &report.detection, &dsh::ProcessRunner)?;\n            println!(\n                \"removed bundle; deleted {} Codewhale-owned file(s)\",\n                removed.len()\n            );","sourceCodeStart":462,"sourceCodeEnd":498,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/integrations/cli.rs#L462-L498","documentation":"`run_dsh` with `RemoveBundle` extracts the installed bundle from the connection record (`record.bundle`) and throws this error when neither the record nor its bundle field exists. There is nothing to remove, so the removal flow aborts instead of running the `dsh plugin ... remove` commands.","triggerScenarios":"Calling `DshIntegrationCommand::RemoveBundle` when `status_report` returns a report with `record == None` or `record.bundle == None` — no bundle was ever installed, or the record was recreated without bundle info.","commonSituations":"Running `remove-bundle` twice (idempotency mistake); running it on a fresh workspace where connect happened but install-bundle never did; a stale/corrupted record that lost the bundle field.","solutions":["Check status first (`codewhale status` / status report) and only run remove-bundle when a bundle is reported installed.","If nothing is installed, no action is needed — the target state is already reached; skip the command.","If a bundle was manually deleted, reconnect/update so the record refreshes, then re-check status.","If the record is stale but files remain under the bundle dir, remove `paths.bundle_dir` manually per the printed plan."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"let (_, report) = status_report(config, workspace, false)?;\nlet installed = report.record.as_ref().and_then(|r| r.bundle.as_ref()).is_some();\nif !installed {\n    eprintln!(\"no bundle installed; nothing to remove\");\n    return Ok(());\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check status before remove-bundle; treat absence as success for idempotent cleanup","Avoid running remove-bundle twice in automation","Refresh the record (connect/update) after manual bundle changes"],"tags":["cli","dsh","nothing-to-remove"],"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"}