deepseek-ai/deepseek-harness · error

conversation.send failed: ${result.error.code}: ${result.err

Error message

conversation.send failed: ${result.error.code}: ${result.error.message}

What it means

ConversationService.send() submits one text block to the scoped session via session.prompt(content, 'queue'). A non-ok host admission result throws 'conversation.send failed: <code>: <message>'; transport-level failures reject the underlying promise directly. Failures land in the caller's promptError path and reject, per the documented contract.

Source

Thrown at packages/client/ui-conversation/src/client/service.ts:133

      this.disposed = true
      for (const url of this.createdImageUrls) revokePreview(url)
      this.createdImageUrls.clear()
      this.draftAttachments.clear()
      this.imageUrls.clear()
      this.imageGenerations.clear()
    }, 'conversation attachment URL cache')
  }

  /**
   * Send a prompt into the scoped session. Business failures also land in the
   * session snapshot's promptError (object-layer state); the rejection here
   * exists for caller choreography (the composer restores the draft on it).
   * @param text - prompt text, sent verbatim as one text block.
   */
  async send(text: string): Promise<void> {
    const session = this.scopedSession('send')
    const result = await session.prompt([{ type: 'text', text }], 'queue')
    if (!result.ok) throw new Error(`conversation.send failed: ${result.error.code}: ${result.error.message}`)
  }

  /**
   * Submit ordered draft images with text through one host admission.
   * @param session - target session.
   * @param text - serialized prompt text.
   * @param imageIds - ordered draft-local attachment ids.
   * @param mode - queue or steer delivery selected by composer policy.
   * @param signal - optional cancellation for the complete Host admission.
   * @returns the Host admission outcome; local attachment preparation failures reject.
   */
  async sendSession(
    session: SessionFace,
    text: string,
    imageIds: readonly DraftAttachmentId[],
    mode: InputSubmitMode,
    signal?: AbortSignal,
  ): Promise<SubmitOutcome> {

View on GitHub (pinned to b150a551b8)

Solutions

  1. Read the embedded error.code for the host's refusal reason
  2. Reconnect, confirm the session binding, and retry the send
  3. If the code indicates queue policy, adjust the submission (for example wait for the running turn) instead of retrying blindly
Defensive patterns

Strategy: retry

Validate before calling

if (!sessions.binding(sessionId)?.session) {
  await reconnect()
  return
}

Try / catch

try {
  await conversation.send(text)
} catch (error) {
  await reconnect()
  await conversation.send(text) // exactly one supervised retry
}

Prevention

When it happens

Trigger: Calling send() when the prompt RPC rejects: the session was closed or reassigned, the host refused queue admission, or the connection dropped while the call was in flight.

Common situations: Sending text just as the host restarts; session token expired or revoked; host queue policy refusing the admission (limits, state machine).

Related errors


AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24). Data as JSON: /api/errors/01819de0202e6286. Report an issue: GitHub.