Hmbown/CodeWhale · error
DSH integration is disabled; run
Error message
DSH integration is disabled; run `{CLI_COMMAND} enable` to launch again What it means
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.
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
Example fix
// before codewhale dsh run # fails: integration is disabled // after codewhale dsh enable codewhale dsh run
Defensive patterns
Strategy: type-guard
Validate before calling
let report = dsh_report()?;
if !report.state.launchable() { eprintln!("integration not launchable: {:?}", report.state); } Type guard
fn is_enabled(state: &DshIntegrationState) -> bool {
!matches!(state, DshIntegrationState::Disabled { .. })
} Try / catch
match launch_spec(...) {
Err(e) if e.to_string().contains("integration is disabled") => {
dsh_enable()?;
launch_spec(...)
}
r => r,
} Prevention
- Run `codewhale dsh enable` after any manual disable
- Check the integration state before scripted launches
- Keep disable/enable pairs in automation scripts symmetric
When it happens
Trigger: 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`.
Common situations: 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.
Understand the failure class
Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.
Related errors
- Codewhale TUI requires an interactive terminal (stdin and…
- dsh binary path is unknown
- DSH is not connected; nothing to
- dsh is offline
- installed dsh is incompatible
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/37d75f0876837e1f.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/integrations/dsh/mod.rs:684
}
out
}
}
pub(crate) fn launch_spec(
report: &DshStatusReport,
profile_override: Option<&str>,
extra_args: &[String],
workspace: &Path,
) -> Result<LaunchSpec> {
let record = report.record.as_ref().ok_or_else(|| {
anyhow::anyhow!("DSH is not connected; run `{CLI_COMMAND} connect` first")
})?;
if !report.state.launchable() {
match &report.state {
DshIntegrationState::Connected { .. } | DshIntegrationState::StaleVersion { .. } => {}
DshIntegrationState::Disabled { .. } => {
anyhow::bail!(
"DSH integration is disabled; run `{CLI_COMMAND} enable` to launch again"
)
}
DshIntegrationState::StaleConfig { reason, .. } => {
anyhow::bail!(
"DSH overlay is stale ({reason}); run `{CLI_COMMAND} update` before launching"
)
}
DshIntegrationState::Incompatible { reason, .. } => {
anyhow::bail!("installed dsh is incompatible: {reason}")
}
DshIntegrationState::Offline { reason } => anyhow::bail!("dsh is offline: {reason}"),
DshIntegrationState::NotInstalled => anyhow::bail!("dsh is not installed"),
DshIntegrationState::Detected { .. } => {
anyhow::bail!("DSH is detected but not connected; run `{CLI_COMMAND} connect`")
}
}
}View on GitHub (pinned to 73e0f67d83)