{"record":{"id":"a08eb5b855b80f5c","repo":"ruvnet/ruflo","slug":"task-execution-failed","errorCode":null,"errorMessage":"Task execution failed","messagePattern":"Task execution failed","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/src/task-execution/application/WorkflowEngine.ts","lineNumber":414,"sourceCode":"          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);\n\n        this.eventBus.emit('workflow:taskComplete', {\n          workflowId: workflow.id,\n          taskId: task.id\n        });","sourceCodeStart":396,"sourceCodeEnd":432,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/src/task-execution/application/WorkflowEngine.ts#L396-L432","documentation":"executeTask() threw while running the task under an assigned agent (agent crashed, tool failure, or timeout). runWorkflow catches per-task failures and rethrows with this generic message; consult the task's entry in the workflow event log for the underlying cause.","triggerScenarios":"Thrown at v3/src/task-execution/application/WorkflowEngine.ts:414 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the task's underlying error and logs; fix the failing step and retry the task.","Add per-step error capture so the failing step's diagnostic is propagated to the caller."],"exampleFix":null,"handlingStrategy":"try-catch","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"}