{"record":{"id":"4da2a792bb962d22","repo":"Hmbown/CodeWhale","slug":"queued-plugin-skill-belongs-to-a-different-workspa","errorCode":null,"errorMessage":"Queued plugin skill belongs to a different workspace and was denied","messagePattern":"Queued plugin skill belongs to a different workspace and was denied","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/tui/ui/dispatch.rs","lineNumber":320,"sourceCode":"    } else if let Err(_err) =\n        dispatch_user_message_with_recovery(app, config, engine_handle, message, recovery).await\n    {\n        // The completion closure re-queued the message and set the status.\n    } else {\n        app.status_message = Some(format!(\"Sent queued follow-up: {display}\"));\n    }\n    Ok(())\n}\n\npub(crate) fn queued_message_content_for_app(\n    app: &App,\n    message: &QueuedMessage,\n    cwd: Option<PathBuf>,\n    git_cache: &mut crate::tui::git_mention::GitMentionCache,\n) -> Result<String> {\n    if let Some(authority) = message.skill_provenance.as_ref() {\n        if authority.workspace != app.workspace {\n            anyhow::bail!(\"Queued plugin skill belongs to a different workspace and was denied\");\n        }\n        crate::plugins::registry::verify_plugin_component_authority(\n            authority,\n            crate::plugins::activation::PluginActivationCapability::Skills,\n        )\n        .map_err(anyhow::Error::msg)?;\n    }\n    // Pass the process CWD explicitly so the resolver's two-pass logic can\n    // honor the user's launch directory when it differs from `--workspace`\n    // (issue #101 — file mentions silently routing to the wrong root).\n    // The completion index is the composer's already-built fuzzy scan: a\n    // bounded fallback for exact misses, with no submit-time tree walk (#4365).\n    let completion_index = app.composer.mention_discovery.fuzzy_candidates(\n        &app.workspace,\n        &app.composer.mention_cwd,\n        app.mention_walk_depth,\n        app.workspace_follow_symlinks,\n    );","sourceCodeStart":302,"sourceCodeEnd":338,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/tui/ui/dispatch.rs#L302-L338","documentation":"Raised in queued_message_content_for_app when a queued plugin message carries skill provenance whose workspace authority does not match the current workspace. A plugin skill queued in one workspace may not inject content when the message is replayed in a different workspace; the cross-workspace mismatch is denied to prevent skill content leaking between workspaces.","triggerScenarios":"Thrown at crates/tui/src/tui/ui/dispatch.rs:320 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-invoke the plugin skill in the current workspace so provenance matches","Clear or drop the stale queued message carrying the other workspace's provenance","Return to the workspace the message was queued in to resume it"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}