deepseek-ai/deepseek-harness · error · SessionReferenceError

SESSION_REFERENCE_READ_FAILED

SESSION_REFERENCE_READ_FAILED

Error message

failed to read referenced session: ${error instanceof Error ? error.message : String(error)}

What it means

Error "failed to read referenced session: ${error instanceof Error ? error.message : String(error)}" thrown in deepseek-ai/deepseek-harness.

Source

Thrown at packages/context/session-reference/src/index.ts:259

    references: SessionReferenceInput[],
    signal?: AbortSignal,
  ): Promise<PreparedReferencedMessage> {
    const acceptedContent = structuredClone(content)
    const inputs = normalizeReferences(agent.id, references, this.config.maxReferences)
    if (inputs.length === 0) return { content: acceptedContent }
    assertNotCancelled(signal)
    let prepared: PreparedSource[]
    try {
      prepared = await settleWithCancellation(
        Promise.all(inputs.map(async input => ({
          input,
          snapshot: await this.ctx.sessionQuery.readSurface(input.sessionId),
        }))),
        signal,
      )
    } catch (error: unknown) {
      if (signal?.aborted === true) throw cancelled(signal)
      throw new SessionReferenceError(
        `failed to read referenced session: ${error instanceof Error ? error.message : String(error)}`,
        'SESSION_REFERENCE_READ_FAILED',
        { cause: error },
      )
    }
    assertNotCancelled(signal)

    const rendered = this.renderSources(prepared)
    const prompt = renderPrompt(rendered.map(source => source.data))
    const source: SessionReferenceSource = {
      kind: 'session-reference',
      form: 'recall',
      version: 1,
      references: rendered.map((source, index) => ({
        sessionId: source.data.sessionId,
        label: source.data.label,
        capturedThroughSeq: source.data.capturedThroughSeq,
        ...source.stats,

View on GitHub (pinned to b150a551b8)

Solutions

  1. Fix the underlying read error for the referenced session and retry.

When it happens

Trigger: Thrown at packages/context/session-reference/src/index.ts:259 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/16104216e70bb612. Report an issue: GitHub.