deepseek-ai/deepseek-harness · error · SessionReferenceError
SESSION_REFERENCE_BUDGET_EXCEEDED
SESSION_REFERENCE_BUDGET_EXCEEDED
Error message
referenced session snapshot cannot fit the configured byte budget
What it means
Error "referenced session snapshot cannot fit the configured byte budget" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/context/session-reference/src/index.ts:293
label: source.data.label,
capturedThroughSeq: source.data.capturedThroughSeq,
...source.stats,
inputIndex: index,
})),
}
const additionalContext: UserMessage = createUserMessage({
source,
content: [{ type: 'text', text: prompt }],
})
return { content: acceptedContent, additionalContext }
}
private renderSources(sources: readonly PreparedSource[]): RenderedSource[] {
const rendered: RenderedSource[] = []
for (const source of sources) {
const retained = retainReferencedSession(source.snapshot, source.input.label, this.config.maxReferenceBytes)
if (retained === undefined) {
throw new SessionReferenceError(
'referenced session snapshot cannot fit the configured byte budget',
'SESSION_REFERENCE_BUDGET_EXCEEDED',
)
}
rendered.push(retained)
}
return rendered
}
}
function normalizeReferences(
targetId: SessionId,
references: readonly SessionReferenceInput[],
maxReferences: number,
): Required<SessionReferenceInput>[] {
const seen = new Set<SessionId>()
const normalized: Required<SessionReferenceInput>[] = []
for (const candidate of references as readonly unknown[]) {View on GitHub (pinned to b150a551b8)
Solutions
- Raise the configured byte budget or reference a smaller session snapshot.
When it happens
Trigger: Thrown at packages/context/session-reference/src/index.ts:293 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/3986bd84bae4ba08.
Report an issue: GitHub.