ruvnet/ruflo · error · DarwinUnavailableError
Darwin archive exceeded evaluation-cost budget
Error message
Darwin archive exceeded evaluation-cost budget
What it means
After the Darwin archive returned, the proposer recomputed the total evaluation cost from the archive's own accounting and found it exceeded safetyEnvelope.maxEvaluationCostMicros. The archive claims more spend than the envelope authorizes, so the run fails closed instead of accepting the over-budget result.
Solutions
- Prune candidates to lower total evaluation cost
- Raise the evaluation-cost budget for this run
Example fix
Reduce the evaluation cost of archived candidates or raise the evaluation-cost budget in the flywheel proposer configuration.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at v3/@claude-flow/cli/src/services/flywheel-proposer.ts:232 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/21f11173bcc60a5b.
Report an issue: GitHub.
Appendix: source
Thrown at v3/@claude-flow/cli/src/services/flywheel-proposer.ts:232
timeout = setTimeout(() => reject(new DarwinUnavailableError('Darwin exceeded wall-time budget')), maxWallTimeMs);
timeout.unref?.();
}),
]).finally(() => {
if (timeout) clearTimeout(timeout);
});
if (!result.completed) {
if (input.mode === 'darwin') throw new DarwinUnavailableError(result.reason ?? 'Darwin archive incomplete');
return runLocal(`darwin-incomplete:${result.reason ?? 'unknown'}`);
}
if (result.candidates.length > (input.maxCandidates ?? 256)) {
throw new DarwinUnavailableError('Darwin archive exceeded candidate-count budget');
}
const evaluationCost = result.candidates.reduce(
(sum, candidate) => sum + candidate.resources.evaluationCostMicros,
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)