{"record":{"id":"d86fc6814309570a","repo":"Hmbown/CodeWhale","slug":"only-user-scope-bundles-installed-via-plugin-inst","errorCode":null,"errorMessage":"only user-scope bundles installed via /plugin install can be updated; `{selector}` is a {} bundle","messagePattern":"only user-scope bundles installed via /plugin install can be updated; `(.+?)` is a (.+?) bundle","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/plugins/mutation.rs","lineNumber":171,"sourceCode":"            installed_content_hash: Some(installed.installed_content_hash),\n            outcome: PluginMutationOutcome::Installed,\n        },\n        PluginInstallOutcome::NeedsApproval(host) => blocked(host, true),\n        PluginInstallOutcome::NetworkDenied(host) => blocked(host, false),\n    })\n}\n\nasync fn update_plugin(\n    selector: &str,\n    ctx: &PluginMutationContext<'_>,\n    registry: &mut PluginRegistry,\n) -> Result<PluginMutationReceipt> {\n    let plugin = registry\n        .get(selector)\n        .with_context(|| format!(\"Plugin bundle `{selector}` was not found\"))?\n        .clone();\n    if plugin.scope != PluginScope::User {\n        bail!(\n            \"only user-scope bundles installed via /plugin install can be updated; \\\n             `{selector}` is a {} bundle\",\n            plugin.scope.as_str()\n        );\n    }\n    let plugins_dir = user_plugins_dir(registry)?;\n    let outcome = install::update(plugin.name(), &plugins_dir, ctx.max_size, ctx.network).await?;\n    Ok(match outcome {\n        PluginUpdateResult::NoChange => PluginMutationReceipt {\n            name: plugin.name().to_string(),\n            path: None,\n            content_hash: None,\n            installed_content_hash: None,\n            outcome: PluginMutationOutcome::NoChange,\n        },\n        PluginUpdateResult::Updated(installed) => PluginMutationReceipt {\n            name: installed.name,\n            path: Some(installed.path),","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/plugins/mutation.rs#L153-L189","documentation":"`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.","triggerScenarios":"Calling `/plugin update <selector>` (through `execute` → `update_plugin`) where `registry.get(selector).scope != PluginScope::User` — e.g. updating a built-in/project-scoped bundle.","commonSituations":"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.","solutions":["Update via the mechanism that owns that scope (e.g. upgrade the app for built-ins, pull the repo for project bundles)","If it should be user-managed, install a user-scope copy with `/plugin install <source>` and update that","Check the bundle's scope with `/plugin list` before updating"],"exampleFix":"// before: project-scoped bundle\n/plugin update vendored-plugin   # refuse\n// after: update it where it lives\ncd ~/projects/app && git pull   # or upgrade the app for built-ins","handlingStrategy":"validation","validationCode":"let plugin = registry.get(selector)?;\nif plugin.scope != PluginScope::User {\n    eprintln!(\"{} is {:?}-scoped; update it via its owning mechanism\", selector, plugin.scope);\n    return;\n}","typeGuard":null,"tryCatchPattern":"match update_plugin(selector, registry) {\n    Err(e) if e.to_string().contains(\"only user-scope bundles\") => {\n        eprintln!(\"update this bundle where it lives (app upgrade or repo pull)\");\n    }\n    other => other?,\n}","preventionTips":["Check plugin scope with /plugin list before updating","Only script updates against user-scope bundles","Install a user-scope copy if you need /plugin update"],"tags":["plugins","update","scope"],"backgroundTag":"unsupported-operation","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}