{"record":{"id":"9c90808ccaa4a550","repo":"ruvnet/ruflo","slug":"maximum-concurrent-agents-reached","errorCode":null,"errorMessage":"Maximum concurrent agents reached","messagePattern":"Maximum concurrent agents reached","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/shared/src/core/orchestrator/lifecycle-manager.ts","lineNumber":95,"sourceCode":"\n/**\n * Lifecycle manager implementation\n */\nexport class LifecycleManager implements IAgentLifecycleManager {\n  private pool: IAgentPool;\n\n  constructor(\n    private eventBus: IEventBus,\n    private config: LifecycleManagerConfig,\n    pool?: IAgentPool,\n  ) {\n    this.pool = pool ?? new AgentPool();\n  }\n\n  async spawn(config: IAgentConfig): Promise<IAgent> {\n    // Validate capacity\n    if (!this.pool.hasCapacity(this.config.maxConcurrentAgents)) {\n      throw new Error('Maximum concurrent agents reached');\n    }\n\n    // Validate agent doesn't already exist\n    if (this.pool.get(config.id)) {\n      throw new Error(`Agent with ID ${config.id} already exists`);\n    }\n\n    const agent: IAgent = {\n      id: config.id,\n      name: config.name,\n      type: config.type,\n      config,\n      createdAt: new Date(),\n      status: 'spawning',\n      currentTaskCount: 0,\n      lastActivity: new Date(),\n      metrics: {\n        tasksCompleted: 0,","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/shared/src/core/orchestrator/lifecycle-manager.ts#L77-L113","documentation":"LifecycleManager.spawn checked the agent pool's capacity against config.maxConcurrentAgents and the pool is full. A capacity guard: the new agent config itself is fine, but admitting it would exceed the orchestrator's concurrent-agent budget.","triggerScenarios":"Thrown at v3/@claude-flow/shared/src/core/orchestrator/lifecycle-manager.ts:95 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Increase maxAgents in the orchestrator configuration if more concurrency is required.","Terminate or wait for existing agents before spawning new ones."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}