{"record":{"id":"01819de0202e6286","repo":"deepseek-ai/deepseek-harness","slug":"conversation-send-failed-result-error-code","errorCode":null,"errorMessage":"conversation.send failed: ${result.error.code}: ${result.error.message}","messagePattern":"conversation\\.send failed: (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/client/ui-conversation/src/client/service.ts","lineNumber":133,"sourceCode":"      this.disposed = true\n      for (const url of this.createdImageUrls) revokePreview(url)\n      this.createdImageUrls.clear()\n      this.draftAttachments.clear()\n      this.imageUrls.clear()\n      this.imageGenerations.clear()\n    }, 'conversation attachment URL cache')\n  }\n\n  /**\n   * Send a prompt into the scoped session. Business failures also land in the\n   * session snapshot's promptError (object-layer state); the rejection here\n   * exists for caller choreography (the composer restores the draft on it).\n   * @param text - prompt text, sent verbatim as one text block.\n   */\n  async send(text: string): Promise<void> {\n    const session = this.scopedSession('send')\n    const result = await session.prompt([{ type: 'text', text }], 'queue')\n    if (!result.ok) throw new Error(`conversation.send failed: ${result.error.code}: ${result.error.message}`)\n  }\n\n  /**\n   * Submit ordered draft images with text through one host admission.\n   * @param session - target session.\n   * @param text - serialized prompt text.\n   * @param imageIds - ordered draft-local attachment ids.\n   * @param mode - queue or steer delivery selected by composer policy.\n   * @param signal - optional cancellation for the complete Host admission.\n   * @returns the Host admission outcome; local attachment preparation failures reject.\n   */\n  async sendSession(\n    session: SessionFace,\n    text: string,\n    imageIds: readonly DraftAttachmentId[],\n    mode: InputSubmitMode,\n    signal?: AbortSignal,\n  ): Promise<SubmitOutcome> {","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/client/ui-conversation/src/client/service.ts#L115-L151","documentation":"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.","triggerScenarios":"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.","commonSituations":"Sending text just as the host restarts; session token expired or revoked; host queue policy refusing the admission (limits, state machine).","solutions":["Read the embedded error.code for the host's refusal reason","Reconnect, confirm the session binding, and retry the send","If the code indicates queue policy, adjust the submission (for example wait for the running turn) instead of retrying blindly"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"if (!sessions.binding(sessionId)?.session) {\n  await reconnect()\n  return\n}","typeGuard":null,"tryCatchPattern":"try {\n  await conversation.send(text)\n} catch (error) {\n  await reconnect()\n  await conversation.send(text) // exactly one supervised retry\n}","preventionTips":["Check the session binding before sending","Keep the draft until a send succeeds so retries are cheap","Surface the embedded error code on final failure"],"tags":["rpc","prompt","session","submit"],"backgroundTag":"rpc-request-failed","analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}