deepseek-ai/deepseek-harness · error · Error
summarization produced no text summary content
Error message
summarization produced no text summary content
What it means
The summarization stream finished without a finish error, but after the safe-text projection no text block with non-whitespace content remains — the model returned only reasoning or tool-call blocks, or empty text. Only returned text may enter the checkpoint, so the transaction fails rather than write an empty checkpoint (image output fails earlier with UNSUPPORTED_CONTENT).
Source
Thrown at packages/compaction/compaction-basic/src/summarizer.ts:171
const options: GenerateOptions = {
provider: target.provider,
model: target.model,
messages,
...input.system === undefined ? {} : { system: input.system },
...input.tools === undefined ? {} : { tools: [...input.tools] },
maxTokens: config.maxTokens,
sessionId: agent.session.id,
purpose: 'compaction',
...signal === undefined ? {} : { signal },
}
for await (const chunk of ctx.llm.stream(options)) assembler.push(chunk)
const error = finishError(assembler.finish)
if (error !== undefined) throw error
const rawOutput = assembler.blocks()
const summary = summaryText(rawOutput)
if (!summary.some(block => block.text.trim().length > 0)) {
throw new Error('summarization produced no text summary content')
}
return {
summary,
rawOutput,
llmStreamCall: true,
provider: options.provider,
model: options.model,
maxTokens: config.maxTokens,
...(assembler.usage === undefined ? {} : { usage: assembler.usage }),
}
}
/**
* Wrap raw summary blocks in the durable checkpoint framing.
* @param summary - safe text-only model output.
* @returns content for the synthesized replacement user message.
*/
export function frameSummary(summary: readonly ContentBlock[]): ContentBlock[] {View on GitHub (pinned to b150a551b8)
Solutions
- Route summarization to a plain instruction-following text model via summarizationProvider/summarizationModel
- Retry once — empty completions are often transient
- Inspect the provider response for the purpose:'compaction' call to see what the model actually returned
- If it persists, override the protected summarize() hook with a deterministic summarizer
Example fix
// before: summarizer routed to a tool-forward agent model
ctx.plugin(BasicCompactionEngine, {
summarizationProvider: 'local',
summarizationModel: 'agent-tuned-model',
})
// after: plain text model for the auxiliary call
ctx.plugin(BasicCompactionEngine, {
summarizationProvider: 'deepseek',
summarizationModel: 'deepseek-chat',
}) Defensive patterns
Strategy: retry
Type guard
const isEmptySummary = (error: unknown): error is Error => error instanceof Error && error.message === 'summarization produced no text summary content'
Try / catch
for (let attempt = 0; ; attempt += 1) {
try {
return await ctx.compaction.compactNow(agent, signal)
} catch (error) {
if (isEmptySummary(error) && attempt < 1) continue // empty completions are often transient
throw error
}
} Prevention
- Route summarization to a plain instruction-following text model, not an agent-tuned one
- Retry once on empty output before treating it as a configuration problem
- If a model repeatedly answers the compaction instruction with tool calls or empty text, override the summarize() hook or change the summarization model
When it happens
Trigger: A tool-forward model answers the compaction instruction with a tool-call despite the 'output only the checkpoint text' rule; a reasoning model whose filtered visible output is empty; a provider returning an empty completion under load.
Common situations: Summarization routed to an agent-tuned local model; intermittent empty completions from the provider; instruction-following regressions after a model swap.
Related errors
- summary
- summary is not smaller than the shadowed content (${framedSu
- BasicCompactionConfig: auto must be a boolean
- BasicCompactionConfig: contextWindow (${contextWindow}) must
- BasicCompactionConfig: ${policy.target.provider}/${policy.ta
AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24).
Data as JSON: /api/errors/abb066279d8dcace.
Report an issue: GitHub.