{"record":{"id":"e647e17740ad05a4","repo":"paperclipai/paperclip","slug":"cannot-load-plugin-in-status-plugin-status-p","errorCode":null,"errorMessage":"Cannot load plugin in status '${plugin.status}'. Plugin must be in 'installed' or 'ready' status.","messagePattern":"Cannot load plugin in status '(.+?)'\\. Plugin must be in 'installed' or 'ready' status\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/src/services/plugin-loader.ts","lineNumber":2041,"sourceCode":"\n      return {\n        total: pluginsToLoad.length,\n        succeeded,\n        failed,\n        results: loadResults,\n      };\n    },\n\n    // -----------------------------------------------------------------------\n    // loadSingle\n    // -----------------------------------------------------------------------\n\n    /**\n     * loadSingle — Loads and activates a single plugin by its ID.\n     *\n     * This method retrieves the plugin from the registry, ensures it's in a valid\n     * state, and then calls activatePlugin to start its worker and register its\n     * capabilities (tools, jobs, etc.).\n     *\n     * @param pluginId - The UUID of the plugin to load.\n     * @param options - Optional activation behavior overrides.\n     * @returns A promise that resolves with the result of the activation.\n     */\n    async loadSingle(pluginId: string, options: PluginLoadSingleOptions = {}): Promise<PluginLoadResult> {\n      if (!runtimeServices) {\n        throw new Error(\n          \"Cannot loadSingle: no PluginRuntimeServices provided. \" +\n            \"Pass runtime services as the third argument to pluginLoader().\",\n        );\n      }\n\n      const plugin = (await registry.getById(pluginId)) as PluginRecord | null;\n      if (!plugin) {\n        throw new Error(`Plugin not found: ${pluginId}`);\n      }\n","sourceCodeStart":2023,"sourceCodeEnd":2059,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/server/src/services/plugin-loader.ts#L2023-L2059","documentation":"State-machine guard in loadSingle: the plugin's status is neither installed nor ready, so it cannot be loaded (e.g. it is disabled, errored, or uninstalled). Callers must move the plugin into a loadable state first; the plugin's lifecycle status is at fault.","triggerScenarios":"Thrown at server/src/services/plugin-loader.ts:2038 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Transition the plugin to 'installed' or 'ready' status before loading (complete install/build steps first)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3f1d897a7c018d76563a21c6e39c3c9b03933622","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}