Hmbown/CodeWhale · error
dsh plugin add {} failed: {}
Error message
dsh plugin add {} failed: {} What it means
`install_into_profile` runs two `dsh plugin --profile codewhale add` commands in order — first the app bundle (`@deepseek-ai/dsh-<app>` linked from the launcher), then the Codewhale bundle so its rows patch last. This error fires when the first add fails: `run_dsh_plugin` reports success=false and the message embeds the command's `output_excerpt`, so dsh/pnpm's own diagnostic text is part of the error. Nothing Codewhale-owned has been added yet at this point.
Source
Thrown at crates/tui/src/integrations/dsh/bundle.rs:338
pub(crate) fn install_into_profile(
runner: &dyn DshRunner,
detection: &DshDetection,
app: DshAppBundle,
bundle_dir: &Path,
) -> Result<(PathBuf, Vec<PluginCommandOutcome>)> {
let binary = detection
.binary
.as_ref()
.ok_or_else(|| anyhow::anyhow!("dsh binary is unknown"))?;
let app_source = app_bundle_source(binary, app)?;
let mut outcomes = Vec::new();
let app_source_str = app_source.display().to_string();
let first = run_dsh_plugin(runner, binary, BUNDLE_PROFILE, &["add", &app_source_str])?;
let first_ok = first.success;
let first_excerpt = first.output_excerpt.clone();
outcomes.push(first);
if !first_ok {
anyhow::bail!(
"dsh plugin add {} failed: {}",
app.package_name(),
first_excerpt
);
}
let bundle_str = bundle_dir.display().to_string();
let second = run_dsh_plugin(runner, binary, BUNDLE_PROFILE, &["add", &bundle_str])?;
let second_ok = second.success;
let second_excerpt = second.output_excerpt.clone();
outcomes.push(second);
if !second_ok {
anyhow::bail!("dsh plugin add {BUNDLE_PACKAGE_NAME} failed: {second_excerpt}");
}
Ok((app_source, outcomes))
}
pub(crate) fn remove_from_profile(
runner: &dyn DshRunner,View on GitHub (pinned to 8880682c63)
Solutions
- Read the output_excerpt in the error — it is dsh/pnpm's own failure text and names the real cause
- Fix network/registry access (proxy, auth, mirror) and retry; the add is re-runnable
- Check permissions on `$DSH_HOME/profiles/codewhale` — it must be writable by the current user
- If pnpm's store lock is held, stop other pnpm processes and retry install-bundle
Defensive patterns
Strategy: retry
Validate before calling
let app_source = dsh::bundle::app_bundle_source(binary, app)?; // fails early on bad layout
if !app_source.is_dir() {
eprintln!("app bundle source missing: {}", app_source.display());
return Ok(());
}
// ensure the profile dir is writable before invoking dsh plugin
let profile_dir = detection.dsh_home.join("profiles").join(dsh::bundle::BUNDLE_PROFILE);
let writable = std::fs::metadata(&profile_dir).map(|m| !m.permissions().readonly()).unwrap_or(true); Try / catch
match dsh::bundle::install_into_profile(runner, &detection, app, &bundle_dir) {
Ok((_, outcomes)) => Ok(outcomes),
Err(e) => {
// the error embeds run_dsh_plugin's output_excerpt; surface it verbatim
// and treat transient pnpm failures (network, store lock) as retryable
eprintln!("plugin add failed (excerpt included in error): {e:#}");
Err(e)
}
} Prevention
- Treat the embedded output_excerpt as the primary diagnostic — it is dsh/pnpm's own text
- `dsh plugin add` is idempotent, so retrying install-bundle after fixing the excerpt's cause is safe
- Keep $DSH_HOME/profiles/codewhale owned by the invoking user (never create it under sudo)
- Avoid running other pnpm processes against the same store during install
When it happens
Trigger: install-bundle when `dsh plugin --profile codewhale add <app_source_path>` exits non-zero: pnpm registry unreachable, the app source path unreadable, the `codewhale` profile directory not writable, a pnpm store lock conflict, or dsh's plugin subsystem rejecting the package.
Common situations: Offline or proxied networks blocking the npm registry; `$DSH_HOME/profiles/codewhale` owned by another user (created under sudo); concurrent pnpm processes holding the store lock; corporate registries requiring auth that pnpm lacks.
Related errors
- dsh plugin add {BUNDLE_PACKAGE_NAME} failed: {second_excerpt
- dsh plugin remove {BUNDLE_PACKAGE_NAME} failed: {}
- DSH plugin path not available: {reason}
- DSH is not connected; run `{CLI_COMMAND} connect`
- dsh exited with status {code}
AI-assisted analysis of Hmbown/CodeWhale@8880682c63 (2026-08-16).
Data as JSON: /api/errors/655462bb3dc2b4e9.
Report an issue: GitHub.