{"record":{"id":"677e78133e095885","repo":"deepseek-ai/deepseek-harness","slug":"rpcid-mismatch-for-method-sent-message-rpcid","errorCode":null,"errorMessage":"rpcId mismatch for ${method}: sent ${message.rpcId}, got ${full.rpcId}","messagePattern":"rpcId mismatch for (.+?): sent (.+?), got (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/host/apiproxy/src/fetch/client.ts","lineNumber":344,"sourceCode":"  }\n\n  /**\n   * Unary protocol path: mint → tap → POST full form → envelope parse → verify\n   * echo → value parse → tap → narrow. Virtual so a fake carrier (fixture) can\n   * override transport at this layer.\n   */\n  protected async callUnary<K extends keyof RpcMethodMap>(\n    method: K,\n    payload: RequestPayload<K>,\n    signal?: AbortSignal,\n    timeoutPolicy: UnaryTimeoutPolicy = 'default',\n  ): Promise<RpcResponse<ResponseValue<K>>> {\n    const message: ClientRequest = { type: 'client-request', rpcId: this.mintRpcId(), method, payload }\n    this.onEnvelope(message)\n    const response = await this.postJson(`/api/${method}`, message, signal, timeoutPolicy)\n    const full = serverResponseSchema.parse(await response.json())\n    this.onEnvelope(full)\n    if (full.rpcId !== message.rpcId) throw new Error(`rpcId mismatch for ${method}: sent ${message.rpcId}, got ${full.rpcId}`)\n    if (!full.result.ok) return { rpcId: full.rpcId, result: full.result }\n    // Second-level S→C parse: the ok value must match the method's Value schema (mirror of the\n    // handler's request-payload parse). The cast collapses the Wire<> widening, same as the handler side.\n    const value = UNARY_VALUE_SCHEMAS[method].parse(full.result.value) as ResponseValue<K>\n    return { rpcId: full.rpcId, result: { ok: true, value } }\n  }\n\n  /** Mux stream opener; virtual for the same override reason as callUnary. */\n  protected openMux(_payload: Parameters<ApiProxy['events']['mux']>[0]['payload'], signal: AbortSignal, onOpen?: () => void): AsyncIterable<RpcRequest<MuxFrame>> {\n    return this.readSse('/api/events.mux', signal, muxFrameSchema, onOpen)\n  }\n\n  /** Host stream opener; virtual. */\n  protected openHost(_payload: Parameters<ApiProxy['events']['host']>[0]['payload'], signal: AbortSignal, onOpen?: () => void): AsyncIterable<RpcRequest<HostFrame>> {\n    return this.readSse('/api/events.host', signal, hostFrameSchema, onOpen)\n  }\n\n  /**","sourceCodeStart":326,"sourceCodeEnd":362,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/host/apiproxy/src/fetch/client.ts#L326-L362","documentation":"Error \"rpcId mismatch for ${method}: sent ${message.rpcId}, got ${full.rpcId}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/host/apiproxy/src/fetch/client.ts:344 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}