Hmbown/CodeWhale · error
DSH is not connected; run
Error message
DSH is not connected; run `{CLI_COMMAND} connect` What it means
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.
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.
Example fix
// before codewhale dsh disconnect # no record // after codewhale dsh connect codewhale dsh disconnect
Defensive patterns
Strategy: validation
Validate before calling
let (_, report) = status_report(config, workspace, allow_full_access)?;
if report.record.is_none() {
eprintln!("DSH is not connected; skipping disconnect");
return Ok(());
} Try / catch
// Rust
if let Some(record) = report.record.as_ref() {
proceed(record);
} else {
eprintln!("run `codewhale dsh connect` first");
} Prevention
- 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).
When it happens
Trigger: 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.
Common situations: Running disconnect on a fresh machine or workspace; the overlay file was deleted manually; disconnecting twice in a row.
Understand the failure class
Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.
Related errors
- --app must be `web` or `headless`, got
- cannot resolve the current Codewhale route
- dsh binary path is unknown
- DSH is already connected; use
- DSH is not connected; nothing to remove
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/3d60c7154e9297cf.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/integrations/cli.rs:339
println!(
"connected: {} (sha256 {})",
record.overlay_path.display(),
record.overlay_sha256
);
println!("receipt: {}", paths.receipt.display());
Ok(())
}
DshIntegrationCommand::Update {
profile,
allow_full_access,
skin,
ocean,
yes,
} => {
let (paths, report) = status_report(config, workspace, allow_full_access)?;
ensure_launchable_dsh(&report)?;
let record = report.record.as_ref().ok_or_else(|| {
anyhow::anyhow!("DSH is not connected; run `{CLI_COMMAND} connect`")
})?;
let profile = profile.unwrap_or_else(|| record.profile.clone());
let skin = skin.unwrap_or(record.skin_enabled);
let ocean = ocean.unwrap_or(record.ocean_enabled);
let identity = dsh::codewhale_route_identity(config, workspace)
.map_err(|e| anyhow::anyhow!("cannot resolve the current Codewhale route: {e}"))?;
let plan = dsh::plan(
&paths,
&report.detection,
&identity,
&profile,
allow_full_access,
skin,
ocean,
)?;
print_plan(&plan, "update");
confirm(yes, "Rewrite the Codewhale overlay for DSH?")?;
let record =View on GitHub (pinned to 73e0f67d83)