deepseek-ai/deepseek-harness · error · Error
invalid inbox splice
Error message
invalid inbox splice
What it means
Error "invalid inbox splice" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/core/agent/src/inbox.ts:209
for (const message of event.data.inserted) this.notifications.inserted(message)
return removed
}
/** Apply one normalized durable splice to the projection. */
private apply(splice: SessionEventMap['agent/inbox/spliced']): UserMessage[] {
this.validate(splice)
const inbox = this.state[splice.target]
return inbox.splice(splice.start, splice.removedCount ?? 0, ...splice.inserted)
}
/** Validate one normalized splice against the current projection. */
private validate(splice: SessionEventMap['agent/inbox/spliced']): void {
const inbox = this.state[splice.target]
const removedCount = splice.removedCount ?? 0
if (!Number.isSafeInteger(splice.start) || splice.start < 0 || splice.start > inbox.length
|| !Number.isSafeInteger(removedCount) || removedCount < 0
|| splice.start + removedCount > inbox.length) {
throw new Error('invalid inbox splice')
}
const candidate = inbox.toSpliced(splice.start, removedCount, ...splice.inserted)
const ids = new Set<string>()
for (const message of splice.target === 'next-turn'
? [...candidate, ...this.nextStep]
: [...this.nextTurn, ...candidate]) {
if (ids.has(message.id)) throw new Error(`message "${message.id}" is already pending`)
ids.add(message.id)
}
}
}
View on GitHub (pinned to b150a551b8)
Solutions
- Fix the inbox splice parameters so index and length are valid.
When it happens
Trigger: Thrown at packages/core/agent/src/inbox.ts:209 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/456472068c838f33.
Report an issue: GitHub.