deepseek-ai/deepseek-harness · error · Error
goal resume has an invalid phase transition or exhausted…
Error message
goal resume has an invalid phase transition or exhausted round budget
What it means
State-machine guard for resume: the current phase is not resumable (active, paused, blocked), the incoming phase is not active, or the goal has already consumed its full maxGoalRounds budget. Any of these makes the resume illegal.
Solutions
- Resume only from active, paused, or blocked phases
- Raise maxGoalRounds via edit if the round budget is exhausted
- Create a new goal if this one cannot continue
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/goal/goal/src/fold.ts:233 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/f1d99c5a5c6f09d2.
Report an issue: GitHub.
Appendix: source
Thrown at packages/goal/goal/src/fold.ts:233
case 'edit':
if (next.phase !== current.phase
|| JSON.stringify(next.blockedReason) !== JSON.stringify(current.blockedReason)) {
throw new Error('goal edit cannot change phase or blocked reason')
}
break
case 'pause':
requireSameDefinition(current, next, change.operation)
if (current.phase !== 'active' || next.phase !== 'paused') throw new Error('goal pause has an invalid phase transition')
break
case 'resume': {
requireSameDefinition(current, next, change.operation)
const resumable: ReadonlySet<GoalPhase> = new Set([
'active',
'paused',
'blocked',
])
if (!resumable.has(current.phase) || next.phase !== 'active' || state.roundsStarted >= next.maxGoalRounds) {
throw new Error('goal resume has an invalid phase transition or exhausted round budget')
}
break
}
case 'complete':
requireSameDefinition(current, next, change.operation)
if (current.phase === 'complete' || next.phase !== 'complete') throw new Error('goal complete has an invalid phase transition')
break
case 'block':
requireSameDefinition(current, next, change.operation)
if (current.phase !== 'active' || next.phase !== 'blocked') throw new Error('goal block has an invalid phase transition')
break
/* v8 ignore start -- the caller excludes create and GoalOperation is closed; these arms retain fail-loud exhaustiveness */
case 'create':
throw new Error('goal create cannot be validated as a current-goal transition')
default:
change.operation satisfies never
throw new Error('unknown goal snapshot operation')
/* v8 ignore stop */View on GitHub (pinned to b150a551b8)