Hmbown/CodeWhale · warning
Queued plugin skill belongs to a different workspace and…
Error message
Queued plugin skill belongs to a different workspace and was denied
What it means
Before rendering/serializing a queued message, the dispatcher checks the message's plugin-skill provenance. If the skill was recorded under a different workspace than the current one, executing it would cross a trust boundary, so the queued message is rejected outright rather than silently retargeted.
Solutions
- Re-queue the plugin skill from within the current workspace so its provenance matches
- Discard the queued message (it is intentionally denied); type the request again in the current workspace
- If you genuinely moved workspaces, reopen the session from the original workspace to run the queued skill
Defensive patterns
Strategy: type-guard
Validate before calling
if let Some(auth) = message.skill_provenance.as_ref() {
if auth.workspace != app.workspace {
eprintln!("queued skill is from another workspace; dropping");
return Ok(String::new());
}
} Type guard
fn skill_in_current_workspace(m: &QueuedMessage, app: &App) -> bool {
m.skill_provenance
.as_ref()
.map_or(true, |a| a.workspace == app.workspace)
} Try / catch
let content = match queued_message_content_for_app(app, msg, cwd, git_cache) {
Err(e) if e.to_string().contains("different workspace") => {
drop_or_requeue(msg); String::new()
}
r => r?,
}; Prevention
- Re-queue plugin skills after switching workspaces instead of carrying the old queue
- Don't share or copy session state containing queued plugin messages across workspaces
- Verify `skill_provenance.workspace` matches before restoring persisted queues
When it happens
Trigger: Calling `queued_message_content_for_app` (directly or via prepare_user_dispatch / steer_user_message / preview builders) on a `QueuedMessage` whose `skill_provenance.workspace` differs from `app.workspace` — e.g. a queue persisted in a shared or restored session and then opened from another workspace.
Common situations: Restoring a session queue saved in project A while the TUI runs in project B; copying session state between machines/worktrees; switching workspaces with queued plugin-skill messages pending.
Related errors
- fleet task ' ' is write-capable but declares no…
- fleet task ' ' path ' ' must be one repo-relative line and…
- installed plugin has no supported manifest
- plugin name is not a safe directory name
- [plugin].name is not a safe directory name
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/4da2a792bb962d22.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/tui/ui/dispatch.rs:365
} 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(app.tr(MessageId::ToastSentIntoTurn).into_owned());
}
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 73e0f67d83)