Hmbown/CodeWhale · error
reviewed plugin stage could not be opened for launch
Error message
reviewed plugin stage could not be opened for launch
What it means
Before launching a reviewed plugin's stdio MCP server, the staged manifest is re-validated (PluginManifest::validate_from_path); failure refuses the launch with this error. The staged copy of the plugin under the stage root is missing, unreadable, or fails its own manifest validation, so the reviewed bundle can no longer be opened at all.
Source
Thrown at crates/tui/src/mcp.rs:663
}
pub(crate) fn prepare_stdio_launch(
&self,
server_name: &str,
command: &str,
args: &[String],
cwd: Option<&Path>,
) -> Result<ReviewedStdioLaunch> {
self.validate_before_stdio_spawn(server_name)?;
let staged_root = self
.authority
.staged_manifest
.parent()
.context("reviewed plugin stage manifest has no parent")?;
let validated = crate::plugins::manifest::PluginManifest::validate_from_path(
&self.authority.staged_manifest,
)
.map_err(|_| anyhow::anyhow!("reviewed plugin stage could not be opened for launch"))?;
if validated.content_hash != self.authority.content_hash
|| validated.capability_hash != self.authority.capability_hash
{
anyhow::bail!("reviewed plugin stage changed before stdio launch");
}
let mut launch = ReviewedStdioLaunch {
command: std::ffi::OsString::from(command),
args: args.iter().map(std::ffi::OsString::from).collect(),
cwd: cwd.map(Path::to_path_buf),
opened_files: Vec::new(),
#[cfg(unix)]
cwd_fd: None,
};
if Path::new(command).is_absolute() {
launch.bind_command(staged_root, Path::new(command), &validated.file_hashes)?;
}
for (index, argument) in args.iter().enumerate() {View on GitHub (pinned to 8880682c63)
Solutions
- Run /plugin reload to restage the plugin from its reviewed source, then retry the launch
- If reload keeps failing, inspect the stage root for missing or corrupt files
- Reinstall or re-import the plugin bundle and redo the review/enable flow
- Exclude the stage directory from tmp cleaners and backup pruning so the stage survives
Example fix
# error: reviewed plugin stage could not be opened for launch /plugin reload /plugin show <name> /plugin enable <name>
Defensive patterns
Strategy: retry
Validate before calling
// Before launch, confirm the staged manifest exists and parses
fn stage_openable(manifest: &std::path::Path) -> bool {
manifest.is_file()
&& std::fs::read(manifest)
.ok()
.and_then(|b| serde_json::from_slice::<serde_json::Value>(&b).ok())
.is_some()
} Try / catch
// On refusal, restage once via the documented flow, then give up loudly
if launch_err.to_string().contains("could not be opened for launch") {
reload_plugin(&name)?; // /plugin reload
retrust_and_enable(&name)?; // trust command + /plugin enable
return relaunch_once(&name);
} Prevention
- Keep plugin stage directories out of tmp-cleaner and cache-prune paths
- Restage after OS restores or home-directory copies
- Treat repeated stage-open failures as corruption and reinstall the bundle
- Automate /plugin reload after bulk plugin updates
When it happens
Trigger: Stage directory deleted or partially cleaned (tmp cleaner, cache purge), staged manifest corrupted or truncated (disk full during staging), permissions changed under the stage root, or a version-skewed stage left by an interrupted plugin update.
Common situations: System tmp cleaners removing stage directories, disk-full corrupting staged files, concurrent plugin updates, home-directory copies or restores that break stage contents.
Related errors
- reviewed plugin stdio cwd escaped its staged root
- Refusing to {operation} MCP server '{server_name}' from plug
- Refusing MCP server '{server_name}': its remote endpoint no
- reviewed plugin executable bytes changed before spawn
- reviewed plugin MCP endpoint must not contain user informati
AI-assisted analysis of Hmbown/CodeWhale@8880682c63 (2026-08-16).
Data as JSON: /api/errors/c5a42e37c415259b.
Report an issue: GitHub.