{"record":{"id":"935cd3a10a4a1b09","repo":"musistudio/claude-code-router","slug":"plugin-pluginconfig-id-disabled-after-startup","errorCode":null,"errorMessage":"[plugin:${pluginConfig.id}] Disabled after startup failure: ${formatError(error)}","messagePattern":"\\[plugin:(.+?)\\] Disabled after startup failure: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/core/src/plugins/service.ts","lineNumber":284,"sourceCode":"  async start(config: AppConfig): Promise<void> {\n    await this.stop({ nextConfig: config });\n    this.config = config;\n    this.registerBuiltInGatewayRequestTransforms();\n\n    for (const pluginConfig of config.plugins ?? []) {\n      if (pluginConfig.enabled === false) {\n        continue;\n      }\n      if (!pluginAvailableInCurrentRuntime(pluginConfig)) {\n        continue;\n      }\n      const snapshot = this.createStateSnapshot();\n      this.resourceOwnerIds.add(pluginConfig.id);\n      try {\n        await this.loadConfiguredPlugin(pluginConfig);\n      } catch (error) {\n        await this.rollbackConfiguredPluginLoad(pluginConfig.id, snapshot);\n        console.warn(`[plugin:${pluginConfig.id}] Disabled after startup failure: ${formatError(error)}`);\n      }\n    }\n  }\n\n  async stop(options: { nextConfig?: AppConfig } = {}): Promise<void> {\n    const stopHooks = [...this.stopHooks].reverse();\n    const nextEnabledPluginIds = options.nextConfig ? enabledPluginIds(options.nextConfig) : undefined;\n    this.stopHooks = [];\n\n    for (const stopHook of stopHooks) {\n      try {\n        await stopHook.stop({ reason: stopReasonForPlugin(stopHook.pluginId, nextEnabledPluginIds) });\n      } catch (error) {\n        console.warn(`[plugin] Stop hook failed: ${formatError(error)}`);\n      }\n    }\n\n    const resourceOwnerIds = [...this.resourceOwnerIds].reverse();","sourceCodeStart":266,"sourceCodeEnd":302,"githubUrl":"https://github.com/musistudio/claude-code-router/blob/99f24806c6a2c660b16e53e95211c517448a6c90/packages/core/src/plugins/service.ts#L266-L302","documentation":"Logged by GatewayPluginService.start after loadConfiguredPlugin throws during startup: the service rolls the plugin back to its pre-load snapshot (rollbackConfiguredPluginLoad) and marks it disabled, but startup continues for other plugins. The plugin will not be active this session.","triggerScenarios":"A configured plugin whose module fails to load (missing dependency, incompatible API version), whose init throws, or whose registration fails validation. The catch runs rollback then warns.","commonSituations":"Plugin installed for an older gateway API version after upgrading core; plugin package not installed or with broken node_modules; plugin config invalid (bad credentials, missing env vars its init requires).","solutions":["Check the formatted error for the real cause (module not found, init exception, config validation).","Update or reinstall the plugin package to a version compatible with your core version.","Fix the plugin's configuration (env vars, credentials) before restarting.","Temporarily remove the plugin from config to start clean, then re-add once fixed."],"exampleFix":"// before\n\"plugins\": [{\"id\":\"my-plugin\",\"path\":\"./plugins/my-plugin\"}]\n// after (verify install & compatibility first)\n\"plugins\": [{\"id\":\"my-plugin\",\"path\":\"./plugins/my-plugin\",\"enabled\":false}]","handlingStrategy":"try-catch","validationCode":"null","typeGuard":"null","tryCatchPattern":"null","preventionTips":["Pin plugin versions compatible with your core version","Validate plugin config before enabling","Watch startup logs for the root-cause error preceding this warning"],"tags":["plugins","startup","rollback","plugin-lifecycle"],"backgroundTag":"plugin-init-failed","analyzedSha":"99f24806c6a2c660b16e53e95211c517448a6c90","analyzedAt":"2026-08-27T04:11:01.184Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}