Hmbown/CodeWhale · error

only user-scope bundles installed via /plugin install can…

Error message

only user-scope bundles installed via /plugin install can be updated; `{selector}` is a {} bundle

What it means

`update_plugin` only supports plugins at `PluginScope::User` (installed via `/plugin install`). Bundles registered at any other scope (e.g. built-in or project scope) have no user-managed install record and cannot be updated through this path, so it bails naming the actual scope.

Solutions

  1. Update via the mechanism that owns that scope (e.g. upgrade the app for built-ins, pull the repo for project bundles)
  2. If it should be user-managed, install a user-scope copy with `/plugin install <source>` and update that
  3. Check the bundle's scope with `/plugin list` before updating

Example fix

// before: project-scoped bundle
/plugin update vendored-plugin   # refuse
// after: update it where it lives
cd ~/projects/app && git pull   # or upgrade the app for built-ins
Defensive patterns

Strategy: validation

Validate before calling

let plugin = registry.get(selector)?;
if plugin.scope != PluginScope::User {
    eprintln!("{} is {:?}-scoped; update it via its owning mechanism", selector, plugin.scope);
    return;
}

Try / catch

match update_plugin(selector, registry) {
    Err(e) if e.to_string().contains("only user-scope bundles") => {
        eprintln!("update this bundle where it lives (app upgrade or repo pull)");
    }
    other => other?,
}

Prevention

When it happens

Trigger: Calling `/plugin update <selector>` (through `execute` → `update_plugin`) where `registry.get(selector).scope != PluginScope::User` — e.g. updating a built-in/project-scoped bundle.

Common situations: Trying to update a plugin that shipped with the app; updating a project-level plugin managed by the repo rather than the user plugins dir.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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

Appendix: source

Thrown at crates/tui/src/plugins/mutation.rs:171

            installed_content_hash: Some(installed.installed_content_hash),
            outcome: PluginMutationOutcome::Installed,
        },
        PluginInstallOutcome::NeedsApproval(host) => blocked(host, true),
        PluginInstallOutcome::NetworkDenied(host) => blocked(host, false),
    })
}

async fn update_plugin(
    selector: &str,
    ctx: &PluginMutationContext<'_>,
    registry: &mut PluginRegistry,
) -> Result<PluginMutationReceipt> {
    let plugin = registry
        .get(selector)
        .with_context(|| format!("Plugin bundle `{selector}` was not found"))?
        .clone();
    if plugin.scope != PluginScope::User {
        bail!(
            "only user-scope bundles installed via /plugin install can be updated; \
             `{selector}` is a {} bundle",
            plugin.scope.as_str()
        );
    }
    let plugins_dir = user_plugins_dir(registry)?;
    let outcome = install::update(plugin.name(), &plugins_dir, ctx.max_size, ctx.network).await?;
    Ok(match outcome {
        PluginUpdateResult::NoChange => PluginMutationReceipt {
            name: plugin.name().to_string(),
            path: None,
            content_hash: None,
            installed_content_hash: None,
            outcome: PluginMutationOutcome::NoChange,
        },
        PluginUpdateResult::Updated(installed) => PluginMutationReceipt {
            name: installed.name,
            path: Some(installed.path),

View on GitHub (pinned to 73e0f67d83)