{"record":{"id":"8cce64f2433f47b7","repo":"langchain-ai/deepagents","slug":"could-not-read-plugin-manifest-manifest-path-e","errorCode":null,"errorMessage":"Could not read plugin manifest {manifest_path}: {exc}","messagePattern":"Could not read plugin manifest (.+?): (.+?)","errorType":"exception","errorClass":"PluginManifestError","httpStatus":null,"severity":"error","filePath":"libs/code/deepagents_code/plugins/manifest.py","lineNumber":281,"sourceCode":"        fallback_name: Name to use only when deriving a manifest-less plugin.\n\n    Returns:\n        `(manifest, manifest_path, warnings)`.\n\n    Raises:\n        PluginManifestError: If the manifest exists but is invalid.\n    \"\"\"\n    manifest_path = find_manifest_path(root)\n    if manifest_path is None:\n        return None, None, ()\n    try:\n        decoded = json.loads(manifest_path.read_text(encoding=\"utf-8\"))\n    except json.JSONDecodeError as exc:\n        msg = f\"Invalid JSON syntax in {manifest_path}: {exc}\"\n        raise PluginManifestError(msg) from exc\n    except OSError as exc:\n        msg = f\"Could not read plugin manifest {manifest_path}: {exc}\"\n        raise PluginManifestError(msg) from exc\n    if not isinstance(decoded, dict):\n        msg = f\"Plugin manifest {manifest_path} must be a JSON object\"\n        raise PluginManifestError(msg)\n    raw = json_object(decoded)\n\n    warnings: list[str] = []\n    name = _validate_name(raw.get(\"name\"), fallback=fallback_name)\n    component_paths: dict[str, tuple[Path, ...]] = {}\n    for field_name in _PATH_COMPONENT_FIELDS:\n        declaration = raw.get(field_name)\n        if declaration is None:\n            continue\n        if field_name in {\"mcpServers\", \"hooks\"} and isinstance(declaration, dict):\n            continue\n        paths = _resolve_component_paths(declaration, root, field_name, warnings)\n        if paths:\n            component_paths[field_name] = paths\n","sourceCodeStart":263,"sourceCodeEnd":299,"githubUrl":"https://github.com/langchain-ai/deepagents/blob/a1af029e6e73cb17c36bff823d227747b28e91e1/libs/code/deepagents_code/plugins/manifest.py#L263-L299","documentation":"`load_manifest` reads the manifest with `Path.read_text`; an `OSError` (missing permissions, I/O error, etc. — existence is checked earlier via `_find_manifest_path`) is wrapped as `PluginManifestError` with this message so all manifest failures surface as one exception type.","triggerScenarios":"`load_manifest` is called on a plugin root whose manifest file exists at discovery time but cannot be read: permission denied, file deleted between discovery and read, disk I/O error, or path is a broken special file.","commonSituations":"Manifest file made read-only or owned by another user (e.g. after `sudo` installs); a race where a concurrent update deletes the file; NFS/network mount hiccup; antivirus or backup tool locking the file on Windows.","solutions":["Check permissions on the manifest file shown in the error and make it readable (`chmod u+r`).","Verify the file still exists; reinstall the plugin to restore it.","Avoid running installs as root so cache files don't become root-owned.","Retry if the failure was transient (network filesystem)."],"exampleFix":"// before\n$ ls -l plugin.json  # -rw------- root root\n// after\n$ sudo chown $(whoami) plugin.json && chmod u+rw plugin.json","handlingStrategy":"validation","validationCode":"from pathlib import Path\np = Path(\"plugin.json\")\nif not p.is_file() or not p.stat().st_mode & 0o444:\n    raise SystemExit(\"manifest missing or unreadable\")","typeGuard":null,"tryCatchPattern":"try:\n    manifest, _, _ = load_manifest(root)\nexcept PluginManifestError as exc:\n    if \"Could not read plugin manifest\" in str(exc):\n        print(f\"check permissions/restore file: {exc}\")\n    else:\n        raise","preventionTips":["Keep cache files owned by the same user running the tool; avoid mixing sudo and normal runs.","Don't delete plugin directories while installs/updates run.","Verify readability of packaged manifests before shipping them.","On network filesystems, expect transient read failures and retry."],"tags":["plugins","manifest","filesystem","permissions"],"backgroundTag":"manifest-file-unreadable","analyzedSha":"a1af029e6e73cb17c36bff823d227747b28e91e1","analyzedAt":"2026-08-29T11:43:24.718Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}