{"record":{"id":"cb35cbc587180856","repo":"ruvnet/ruflo","slug":"no-agent-available-for-task-task-id","errorCode":null,"errorMessage":"No agent available for task ${task.id}","messagePattern":"No agent available for task (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/src/task-execution/application/WorkflowEngine.ts","lineNumber":409,"sourceCode":"\n      try {\n        // Handle nested workflows\n        if (task.isWorkflow() && task.workflow) {\n          const nestedResult = await this.executeWorkflow(task.workflow);\n          if (nestedResult.status === 'failed') {\n            throw new Error(`Nested workflow failed`);\n          }\n        } else {\n          // Get assigned agent or distribute\n          let agentId = task.assignedTo;\n          if (!agentId) {\n            const agents = await this.coordinator.listAgents();\n            const suitable = agents.find(a => a.canExecute(task.type));\n            agentId = suitable?.id;\n          }\n\n          if (!agentId) {\n            throw new Error(`No agent available for task ${task.id}`);\n          }\n\n          const result = await this.executeTask(task, agentId);\n          if (result.status === 'failed') {\n            throw new Error(result.error || 'Task execution failed');\n          }\n        }\n\n        const endTime = Date.now();\n        execution.taskTimings[task.id] = {\n          start: startTime,\n          end: endTime,\n          duration: endTime - startTime\n        };\n\n        completedTasks.add(task.id);\n        execution.state.completedTasks.push(task.id);\n        execution.executionOrder.push(task.id);","sourceCodeStart":391,"sourceCodeEnd":427,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/src/task-execution/application/WorkflowEngine.ts#L391-L427","documentation":"runWorkflow reached a task that has no assignedTo agent and the coordinator's listAgents() yielded no agent able to execute the task type. The task cannot be dispatched to anyone, so the workflow aborts at that task — a scheduling/capacity failure, not a task-logic failure.","triggerScenarios":"Thrown at v3/src/task-execution/application/WorkflowEngine.ts:409 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Spawn or register an agent with the capabilities required by the task before scheduling it.","Relax the task's capability requirements or queue it until a matching agent becomes available."],"exampleFix":null,"handlingStrategy":"retry","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-14T05:17:10.506Z"}