BigPizzaV3/CodexPlusPlus · error
downloaded openai/plugins marketplace root mismatch
Error message
downloaded openai/plugins marketplace root mismatch
What it means
validate_openai_plugins_marketplace_root (crates/codex-plus-core/src/plugin_marketplace.rs:479-481) compares the marketplace root computed by local_openai_curated_marketplace_root_from_root with the extraction root; a mismatch bails with 'root mismatch'. In the current implementation the helper only ever returns Some(root.to_path_buf()) or None, so the mismatch branch is defensive — reserved for future variants of the root-resolution logic (e.g. searching subdirectories) where the discovered manifest sits below the passed root. If you see it, you are running modified resolution code.
Source
Thrown at crates/codex-plus-core/src/plugin_marketplace.rs:480
Component::Normal(_) => {}
_ => return None,
}
let mut relative = PathBuf::new();
for component in components {
match component {
Component::Normal(value) => relative.push(value),
Component::CurDir => {}
_ => return None,
}
}
(!relative.as_os_str().is_empty()).then_some(relative)
}
fn validate_openai_plugins_marketplace_root(root: &Path) -> anyhow::Result<()> {
let marketplace = local_openai_curated_marketplace_root_from_root(root)?
.ok_or_else(|| anyhow::anyhow!("downloaded openai/plugins marketplace is invalid"))?;
if marketplace != root {
anyhow::bail!("downloaded openai/plugins marketplace root mismatch");
}
Ok(())
}
fn validate_openai_curated_remote_marketplace_root(root: &Path) -> anyhow::Result<()> {
let marketplace = local_openai_curated_remote_marketplace_root_from_root(root)?
.ok_or_else(|| anyhow::anyhow!("embedded official remote plugin marketplace is invalid"))?;
if marketplace != root {
anyhow::bail!("embedded official remote plugin marketplace root mismatch");
}
Ok(())
}
fn local_openai_curated_marketplace_root_from_root(root: &Path) -> anyhow::Result<Option<PathBuf>> {
let marketplace_path = root
.join(".agents")
.join("plugins")
.join("marketplace.json");View on GitHub (pinned to 1f431ae49b)
Solutions
- If you maintain a fork with nested-root discovery, either normalize the extraction root (strip the extra folder before validating) or relax the equality check to `marketplace.starts_with(root)`/containment as appropriate
- Re-extract the zip so the manifest sits at the root the validator expects (pack from inside the marketplace root)
- In stock builds, treat a hit as a canary: diff your plugin_marketplace.rs against upstream, since upstream code paths return None (error 37) instead
Example fix
// before: fork discovers nested manifest, equality fails
let marketplace = find_marketplace_root_anywhere(root)?; // e.g. root/openai-plugins/
if marketplace != root { bail!("root mismatch"); }
// after: validate containment
if !marketplace.starts_with(root) { bail!("root mismatch"); } Defensive patterns
Strategy: validation
Validate before calling
// If using a fork with nested-root discovery, verify equality before install
fn roots_consistent(root: &Path, discovered: Option<&Path>) -> bool {
match discovered { Some(d) => d == root, None => false }
} Type guard
fn same_root(a: &Path, b: &Path) -> bool {
a == b
} Try / catch
Err(e) if e.to_string().contains("marketplace root mismatch") => {
// fork invariant: re-extract so the manifest sits at root, or fix containment logic
anyhow::bail!("marketplace layout changed; re-pack with manifest at the archive root")
} Prevention
- Keep root-resolution helpers and their equality checks in one change unit when refactoring
- Pack zips from inside the marketplace root so discovered root == extraction root
- Add tests asserting validate_* accept the shipped fixture verbatim
When it happens
Trigger: A fork or future version of local_openai_curated_marketplace_root_from_root that returns a directory different from the root argument (e.g. scanning for .agents/ under nested folders) while validate_openai_plugins_marketplace_root still requires equality — stock builds cannot produce this error.
Common situations: Local forks teaching the validator to locate the manifest in nested layouts without updating the equality check; merges that change one function but not its caller; experimental builds during marketplace-layout migrations.
Related errors
- downloaded openai/plugins marketplace is invalid
- embedded official remote plugin marketplace is invalid
- macOS open command is empty
- Codex command is empty
- Responses 请求体不是 UTF-8:{error}
AI-assisted analysis of BigPizzaV3/CodexPlusPlus@1f431ae49b (2026-08-16).
Data as JSON: /api/errors/47336ce0a4d22bd5.
Report an issue: GitHub.