Hmbown/CodeWhale · error

Queued plugin skill belongs to a different workspace and was

Error message

Queued plugin skill belongs to a different workspace and was denied

What it means

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.

Source

Thrown at crates/tui/src/tui/ui/dispatch.rs:320

    } else if let Err(_err) =
        dispatch_user_message_with_recovery(app, config, engine_handle, message, recovery).await
    {
        // The completion closure re-queued the message and set the status.
    } else {
        app.status_message = Some(format!("Sent queued follow-up: {display}"));
    }
    Ok(())
}

pub(crate) fn queued_message_content_for_app(
    app: &App,
    message: &QueuedMessage,
    cwd: Option<PathBuf>,
    git_cache: &mut crate::tui::git_mention::GitMentionCache,
) -> Result<String> {
    if let Some(authority) = message.skill_provenance.as_ref() {
        if authority.workspace != app.workspace {
            anyhow::bail!("Queued plugin skill belongs to a different workspace and was denied");
        }
        crate::plugins::registry::verify_plugin_component_authority(
            authority,
            crate::plugins::activation::PluginActivationCapability::Skills,
        )
        .map_err(anyhow::Error::msg)?;
    }
    // Pass the process CWD explicitly so the resolver's two-pass logic can
    // honor the user's launch directory when it differs from `--workspace`
    // (issue #101 — file mentions silently routing to the wrong root).
    // The completion index is the composer's already-built fuzzy scan: a
    // bounded fallback for exact misses, with no submit-time tree walk (#4365).
    let completion_index = app.composer.mention_discovery.fuzzy_candidates(
        &app.workspace,
        &app.composer.mention_cwd,
        app.mention_walk_depth,
        app.workspace_follow_symlinks,
    );

View on GitHub (pinned to 0c42157ee5)

Solutions

  1. Re-invoke the plugin skill in the current workspace so provenance matches
  2. Clear or drop the stale queued message carrying the other workspace's provenance
  3. Return to the workspace the message was queued in to resume it
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/tui/src/tui/ui/dispatch.rs:320 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20). Data as JSON: /api/errors/4da2a792bb962d22. Report an issue: GitHub.