deepseek-ai/deepseek-harness · error · Error
Ralph workflow returned an oversized handoff
Error message
Ralph workflow returned an oversized handoff (${chars} > ${maxChars}) What it means
Thrown while decoding the last handoff (report) from a Ralph workflow result. The concatenated handoff text exceeds maxHandoffChars, the configured cap that keeps a round report small enough to re-feed into the next round or session context. The workflow provider returned an oversized report and the consumer refuses to accept it rather than silently truncating; the fix is to make the workflow emit a shorter handoff or raise the configured limit.
Solutions
- Reduce the serialized handoff below the limit, or raise maxHandoffChars in the Ralph configuration.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/workflow/tool-ralph/src/index.ts:277 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/15059ccfe36bdaa3.
Report an issue: GitHub.
Appendix: source
Thrown at packages/workflow/tool-ralph/src/index.ts:277
status: expectedStatus,
summary: value['summary'],
evidence: value['evidence'],
nextSteps: value['nextSteps'],
blocker: value['blocker'],
}
if (expectedStatus === 'continue' && (report.nextSteps.length === 0 || report.blocker !== '')) {
throw new Error('Ralph workflow returned an invalid continuing report')
}
if (expectedStatus === 'complete'
&& (report.evidence.length === 0 || report.nextSteps.length !== 0 || report.blocker !== '')) {
throw new Error('Ralph workflow returned an invalid completion report')
}
if (expectedStatus === 'blocked' && !normalizedText(report.blocker)) {
throw new Error('Ralph workflow returned an invalid blocked report')
}
const chars = JSON.stringify(report).length
if (chars > maxChars) {
throw new Error(`Ralph workflow returned an oversized handoff (${chars} > ${maxChars})`)
}
return report
}
/** Defensively decode the fixed script's terminal value. */
function readRunResult(value: unknown, maxRounds: number, maxHandoffChars: number): RalphTerminalResult {
if (!isRecord(value)
|| typeof value['roundsStarted'] !== 'number'
|| !Number.isSafeInteger(value['roundsStarted'])
|| value['roundsStarted'] < 1
|| value['roundsStarted'] > maxRounds) {
throw new Error('Ralph workflow returned a malformed terminal result')
}
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')View on GitHub (pinned to b150a551b8)