ruvnet/ruflo · error · Error

Memory backend not available

Error message

Memory backend not available

What it means

restoreWorkflow() requires a persistence backend, but this.memoryBackend is null/undefined — the engine was constructed without one. Workflow state cannot be retrieved from persistence, so restoration is impossible regardless of workflowId.

Source

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

    return {
      executionTrace: execution.executionOrder.map((taskId, index) => ({
        taskId,
        timestamp: execution.taskTimings[taskId]?.start || Date.now(),
        action: 'execute'
      })),
      taskTimings: execution.taskTimings,
      memorySnapshots: execution.memorySnapshots,
      eventLog: execution.eventLog
    };
  }

  /**
   * Restore a workflow from persisted state
   */
  async restoreWorkflow(workflowId: string): Promise<WorkflowState> {
    if (!this.memoryBackend) {
      throw new Error('Memory backend not available');
    }

    const stateMemory = await this.memoryBackend.retrieve(`workflow-state-${workflowId}`);
    if (!stateMemory) {
      // Try alternate key
      const result = await this.memoryBackend.retrieve('workflow-state');
      if (result) {
        return JSON.parse(result.content);
      }
      throw new Error(`Workflow state not found for ${workflowId}`);
    }

    return JSON.parse(stateMemory.content);
  }

  // ============================================================================
  // Private Helper Methods
  // ============================================================================

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Ensure the module/bridge/plugin initialize() method has been called and awaited before invoking this operation.
  2. Guard against calls made during startup: await the initialization promise or check the initialized flag and fail fast with a clear setup hint.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at v3/src/task-execution/application/WorkflowEngine.ts:329 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/fb304a6f04a1b216. Report an issue: GitHub.