Hmbown/CodeWhale · error

dsh exited with status

Error message

dsh exited with status {code}

What it means

Thrown by `run_dsh` when the spawned `dsh` process (via `dsh::spawn_launch`) terminates with a non-zero exit code. The integration surfaces the child's status as an error rather than swallowing a failed harness launch.

Solutions

  1. Run `dsh status` / re-run the command to inspect the underlying dsh error output
  2. Reinstall or update dsh (`npm i -g @deepseek-ai/dsh`) if the binary is broken
  3. Run `dsh update` to regenerate a possibly stale overlay, then retry
Defensive patterns

Strategy: try-catch

Validate before calling

// preflight: confirm dsh runs
let status = std::process::Command::new("dsh").arg("--version").status()?;
if !status.success() { /* fix dsh install before launching */ }

Try / catch

match spawn_launch(&spec) {
    Ok(0) => /* ok */,
    Ok(code) => /* inspect dsh stderr/logs for exit status {code} */,
    Err(e) => return Err(e.into()),
}

Prevention

When it happens

Trigger: `spawn_launch` returns a non-zero exit status from the dsh binary during a launch-triggering subcommand (and dry_run is false).

Common situations: The dsh CLI crashed or rejected its configuration at startup; the plugin bundle is broken or incompatible; the overlay points at a missing binary; npm-installed dsh fails at runtime.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22). Data as JSON: /api/errors/5517751d7a09f46f. Report an issue: GitHub.

Appendix: source

Thrown at crates/tui/src/integrations/cli.rs:379

                record.overlay_path.display(),
                record.overlay_sha256
            );
            Ok(())
        }
        DshIntegrationCommand::Launch {
            profile,
            dry_run,
            args,
        } => {
            let (_paths, report) = status_report(config, workspace, false)?;
            let spec = dsh::launch_spec(&report, profile.as_deref(), &args, workspace)?;
            println!("{RELATIONSHIP_LABEL}: {}", spec.display());
            if dry_run {
                return Ok(());
            }
            let code = dsh::spawn_launch(&spec)?;
            if code != 0 {
                anyhow::bail!("dsh exited with status {code}");
            }
            Ok(())
        }
        DshIntegrationCommand::Disable => {
            let paths = DshPaths::from_process()?;
            let record = dsh::set_disabled(&paths, true)?;
            println!(
                "disabled: overlay kept at {}; launches refused",
                record.overlay_path.display()
            );
            Ok(())
        }
        DshIntegrationCommand::Enable => {
            let paths = DshPaths::from_process()?;
            let record = dsh::set_disabled(&paths, false)?;
            println!("enabled: {}", record.overlay_path.display());
            Ok(())
        }

View on GitHub (pinned to 73e0f67d83)