ruvnet/ruflo · error · DarwinUnavailableError

Darwin failed closed

Error message

Darwin failed closed: ${(error as Error).message}

What it means

An unexpected (non-DarwinUnavailableError) exception escaped while invoking Darwin in darwin mode. The catch re-raises it as a DarwinUnavailableError wrapping the original message so callers see a single, typed 'Darwin failed closed' error rather than an arbitrary crash leaking from the invoker.

Solutions

  1. Read the wrapped error message for the root cause and fix it
  2. Re-run with the Darwin step disabled if it is optional

Example fix

Read the wrapped error message for the underlying Darwin failure, fix that root cause, and retry; Darwin fails closed so no partial result is used.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at v3/@claude-flow/cli/src/services/flywheel-proposer.ts:247 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/6d6a6a7d4ebc12fc. Report an issue: GitHub.

Appendix: source

Thrown at v3/@claude-flow/cli/src/services/flywheel-proposer.ts:247

      0,
    );
    if (evaluationCost > input.safetyEnvelope.maxEvaluationCostMicros) {
      throw new DarwinUnavailableError('Darwin archive exceeded evaluation-cost budget');
    }
    return finalizeArchive({
      requested: input.mode,
      effective: 'darwin',
      promotionAllowed: true,
      baselineRef,
      safetyEnvelope: input.safetyEnvelope,
      seed: input.seed,
      candidates: result.candidates,
      completed: true,
    });
  } catch (error) {
    if (input.mode === 'darwin') {
      if (error instanceof DarwinUnavailableError) throw error;
      throw new DarwinUnavailableError(`Darwin failed closed: ${(error as Error).message}`);
    }
    return runLocal(`darwin-error:${(error as Error).message}`);
  }
}

View on GitHub (pinned to fa13ee4ad6)