deepseek-ai/deepseek-harness · error · Error

Ralph workflow returned budget-limited before the round…

Error message

Ralph workflow returned budget-limited before the round limit

What it means

readRunResult rejects a 'budget-limited' terminal value whose roundsStarted differs from the agreed maxRounds: budget-limited is legitimate only at the round limit, so an earlier stop means the script mislabeled its outcome.

Solutions

  1. Raise the applicable budget limit (e.g. maxTotalAgents) in the engine configuration, or reduce per-round agent fan-out so the run fits the budget.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/workflow/tool-ralph/src/index.ts:308 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24). Data as JSON: /api/errors/1eabecdb87e8cd6a. Report an issue: GitHub.

Appendix: source

Thrown at packages/workflow/tool-ralph/src/index.ts:308

  }
  const roundsStarted = value['roundsStarted']
  switch (value['status']) {
    case 'complete':
      if (Object.keys(value).sort().join(',') !== 'report,roundsStarted,status') {
        throw new Error('Ralph workflow returned a malformed terminal result')
      }
      return { status: 'complete', roundsStarted, report: readReport(value['report'], 'complete', maxHandoffChars) }
    case 'blocked':
      if (Object.keys(value).sort().join(',') !== 'report,roundsStarted,status') {
        throw new Error('Ralph workflow returned a malformed terminal result')
      }
      return { status: 'blocked', roundsStarted, report: readReport(value['report'], 'blocked', maxHandoffChars) }
    case 'budget-limited':
      if (Object.keys(value).sort().join(',') !== 'report,roundsStarted,status') {
        throw new Error('Ralph workflow returned a malformed terminal result')
      }
      if (roundsStarted !== maxRounds) {
        throw new Error('Ralph workflow returned budget-limited before the round limit')
      }
      return { status: 'budget-limited', roundsStarted, report: readReport(value['report'], 'continue', maxHandoffChars) }
    case 'round-failed': {
      if (Object.keys(value).sort().join(',') !== 'lastReport,roundsStarted,status') {
        throw new Error('Ralph workflow returned a malformed terminal result')
      }
      if (roundsStarted === 1) {
        if (value['lastReport'] !== null) {
          throw new Error('Ralph workflow returned an invalid first-round failure')
        }
        return { status: 'round-failed', roundsStarted }
      }
      if (value['lastReport'] === null) {
        throw new Error('Ralph workflow returned a round failure without its last handoff')
      }
      return {
        status: 'round-failed',
        roundsStarted,

View on GitHub (pinned to b150a551b8)