ruvnet/ruflo · error · Error

Nested workflow failed

Error message

Nested workflow failed

What it means

During runWorkflow, a task that wraps a nested workflow was executed and executeWorkflow() returned status 'failed'. The parent task propagates the child workflow's failure as its own error; the root cause lives in the nested workflow's execution (its own event log holds the detail).

Source

Thrown at v3/src/task-execution/application/WorkflowEngine.ts:397

      // Check if paused
      while (execution.state.status === 'paused') {
        await new Promise(resolve => setTimeout(resolve, 100));
      }

      if (execution.state.status === 'cancelled') {
        break;
      }

      execution.state.currentTask = task.id;

      const startTime = Date.now();

      try {
        // Handle nested workflows
        if (task.isWorkflow() && task.workflow) {
          const nestedResult = await this.executeWorkflow(task.workflow);
          if (nestedResult.status === 'failed') {
            throw new Error(`Nested workflow failed`);
          }
        } else {
          // Get assigned agent or distribute
          let agentId = task.assignedTo;
          if (!agentId) {
            const agents = await this.coordinator.listAgents();
            const suitable = agents.find(a => a.canExecute(task.type));
            agentId = suitable?.id;
          }

          if (!agentId) {
            throw new Error(`No agent available for task ${task.id}`);
          }

          const result = await this.executeTask(task, agentId);
          if (result.status === 'failed') {
            throw new Error(result.error || 'Task execution failed');
          }

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Inspect the nested workflow's error for the root cause; fix the child workflow definition or inputs.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at v3/src/task-execution/application/WorkflowEngine.ts:397 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/668bd7c3f77cd9f5. Report an issue: GitHub.