openai/codex · error · ResolvedPluginError

plugin resource path

Error message

plugin resource path `{path}` is outside package root `{root}`

What it means

ResolvedPluginError variant: one of the plugin manifest's resource paths escapes the package root it belongs to (a PathUri that, when resolved against root, leaves the root). This is a path-traversal safety check ensuring plugin resources stay inside their package, so construction of ResolvedPlugin fails.

Solutions

  1. Fix the resource path in the plugin manifest so it stays under the package root
  2. Remove `..` segments or absolute URIs that escape the root
  3. Repackage the plugin with paths relative to its root
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at codex-rs/plugin/src/provider.rs:42 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of openai/codex@339751715c (2026-08-25). Data as JSON: /api/errors/adce28ce167bcd19. Report an issue: GitHub.

Appendix: source

Thrown at codex-rs/plugin/src/provider.rs:42

        environment_id: String,
        /// Package root URI within that filesystem.
        root: PathUri,
    },
}

/// An inert plugin descriptor whose resources retain their source authority.
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct ResolvedPlugin {
    selected_root_id: String,
    location: ResolvedPluginLocation,
    manifest_path: PluginResourceLocator,
    manifest: PluginManifest<PluginResourceLocator>,
}

/// Failure to construct a resolved plugin with internally consistent resources.
#[derive(Clone, Debug, Error, PartialEq, Eq)]
pub enum ResolvedPluginError {
    #[error("plugin resource path `{path}` is outside package root `{root}`")]
    ResourceOutsideRoot { root: PathUri, path: PathUri },
}

impl ResolvedPlugin {
    /// Creates an environment-owned descriptor from a validated plugin manifest.
    pub fn from_environment(
        selected_root_id: String,
        environment_id: String,
        root: PathUri,
        manifest_path: PathUri,
        manifest: PluginManifest<PathUri>,
    ) -> Result<Self, ResolvedPluginError> {
        let manifest_path = environment_resource(&environment_id, &root, manifest_path)?;
        let manifest = manifest
            .try_map_resources(|path| environment_resource(&environment_id, &root, path))?;
        Ok(Self {
            selected_root_id,
            location: ResolvedPluginLocation::Environment {

View on GitHub (pinned to 339751715c)