deepseek-ai/deepseek-harness · error · SdkProtocolError
session.event carried no event envelope: ${JSON.stringify(va
Error message
session.event carried no event envelope: ${JSON.stringify(value)} What it means
Error "session.event carried no event envelope: ${JSON.stringify(value)}" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/sdk/client/src/api.ts:209
events,
notifications,
}
}
}
/**
* Normalize run input: a string becomes one text block; blocks pass verbatim.
* @param input - prompt text or content blocks.
* @returns the content blocks to send.
*/
export function normalizeInput(input: string | ContentBlock[]): ContentBlock[] {
return typeof input === 'string' ? [{ type: 'text', text: input }] : input
}
/** Validate the fields in a wire `session.event` envelope before returning the typed result. */
function validatedSessionEvent(value: unknown): SessionEvent {
if (!isRecord(value) || typeof value.type !== 'string') {
throw new SdkProtocolError(`session.event carried no event envelope: ${JSON.stringify(value)}`)
}
// The one variant this module reads into (finalResponse) must carry
// kind-tagged content blocks; other variants pass through under their
// envelope shape.
if (value.type === 'assistant/message') {
const message = isRecord(value.data) ? value.data.message : undefined
const content = isRecord(message) ? message.content : undefined
if (!Array.isArray(content) || !content.every(block => isRecord(block) && typeof block.type === 'string')) {
throw new SdkProtocolError(`assistant/message event carried malformed content: ${JSON.stringify(value)}`)
}
}
return value as unknown as SessionEvent
}
/** Whether a raw session event is the durable enqueue receipt for `messageId`. */
function isInboxReceipt(value: unknown, messageId: string): boolean {
if (!isRecord(value) || value.type !== 'agent/inbox/spliced' || !isRecord(value.data)) return false
const inserted = value.data.insertedView on GitHub (pinned to b150a551b8)
Solutions
- Upgrade the server: it must send session.event envelopes matching the SDK protocol version.
- Reconnect with a compatible SDK/server pair.
When it happens
Trigger: Thrown at packages/sdk/client/src/api.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/40ec797e353b09d7.
Report an issue: GitHub.