{"record":{"id":"3e9a05dc4cedc41c","repo":"ruvnet/ruflo","slug":"maximum-plugin-limit-this-config-maxplugins-r","errorCode":null,"errorMessage":"Maximum plugin limit (${this.config.maxPlugins}) reached","messagePattern":"Maximum plugin limit \\((.+?)\\) reached","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/plugins/src/registry/enhanced-plugin-registry.ts","lineNumber":297,"sourceCode":"    // Resolve factory if needed\n    const resolvedPlugin = typeof plugin === 'function' ? await plugin() : plugin;\n\n    // Validate plugin\n    if (!validatePlugin(resolvedPlugin)) {\n      throw new Error('Invalid plugin: does not implement IPlugin interface');\n    }\n\n    const name = resolvedPlugin.metadata.name;\n    const version = resolvedPlugin.metadata.version;\n\n    // Check for duplicates\n    if (this.plugins.has(name)) {\n      throw new Error(`Plugin ${name} already registered`);\n    }\n\n    // Check max plugins\n    if (this.config.maxPlugins && this.plugins.size >= this.config.maxPlugins) {\n      throw new Error(`Maximum plugin limit (${this.config.maxPlugins}) reached`);\n    }\n\n    // Check core version compatibility\n    if (resolvedPlugin.metadata.minCoreVersion) {\n      if (!satisfiesVersion(`>=${resolvedPlugin.metadata.minCoreVersion}`, this.config.coreVersion)) {\n        throw new Error(\n          `Plugin ${name} requires core version >= ${resolvedPlugin.metadata.minCoreVersion}, ` +\n          `but current version is ${this.config.coreVersion}`\n        );\n      }\n    }\n    if (resolvedPlugin.metadata.maxCoreVersion) {\n      if (!satisfiesVersion(`<=${resolvedPlugin.metadata.maxCoreVersion}`, this.config.coreVersion)) {\n        throw new Error(\n          `Plugin ${name} requires core version <= ${resolvedPlugin.metadata.maxCoreVersion}, ` +\n          `but current version is ${this.config.coreVersion}`\n        );\n      }","sourceCodeStart":279,"sourceCodeEnd":315,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/plugins/src/registry/enhanced-plugin-registry.ts#L279-L315","documentation":"Thrown by EnhancedPluginRegistry.register() when config.maxPlugins is set and plugins.size has already reached it. This is a capacity guard on the registry instance (default config may leave it undefined, in which case the check never fires), evaluated after the duplicate-name check and before version compatibility.","triggerScenarios":"Creating EnhancedPluginRegistry with config { maxPlugins: 10 } and registering an 11th plugin; dynamically discovering and registering plugins at runtime until the cap is hit; copying a config preset with a low maxPlugins into a workload that legitimately needs more plugins.","commonSituations":"Right-sizing a registry for one deployment then reusing the config in a bigger one; plugins auto-registered per tenant/feature accumulating beyond the intended cap; a cap added defensively during development left in production config.","solutions":["Raise or remove maxPlugins in the registry config if the plugin count is legitimately growing","Unregister unused plugins before registering new ones to stay under the cap","Audit what is registered (registry list API / logs 'Plugin registered: ...') to find plugins you did not intend to load"],"exampleFix":"// before\nconst registry = new EnhancedPluginRegistry({ coreVersion: '3.0.0', maxPlugins: 5 });\n// 6th register() -> throws Maximum plugin limit (5) reached\n\n// after\nconst registry = new EnhancedPluginRegistry({ coreVersion: '3.0.0', maxPlugins: 20 });","handlingStrategy":"validation","validationCode":"const registered = await registry.list();\nif (registryConfig.maxPlugins !== undefined && registered.length >= registryConfig.maxPlugins) {\n  // free slots or fail loudly before register() throws\n  for (const stale of pickStalePlugins(registered)) {\n    await registry.unregister(stale.metadata.name);\n  }\n}\nawait registry.register(plugin);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Size maxPlugins against the plugin count you actually deploy, with headroom","Log registrations ('Plugin registered: ...') so creeping plugin counts are visible before the cap bites","Prefer unregistering unused plugins over endlessly raising the cap"],"tags":["capacity-limit","plugin-registry","config","typescript"],"backgroundTag":"registry-cap-exceeded","analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}