{"record":{"id":"09511dbb07b78bbd","repo":"deepseek-ai/deepseek-harness","slug":"subject-message-has-mismatched-tool-call-ids","errorCode":null,"errorMessage":"${subject} message has mismatched tool call ids","messagePattern":"(.+?) message has mismatched tool call ids","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/session/src/index.ts","lineNumber":350,"sourceCode":"      throw new Error(`${subject} message must have model source`)\n    }\n    return\n  }\n  if (type !== 'tool/result') return\n  if (sourceRecord['kind'] !== 'tool'\n    || typeof sourceRecord['callId'] !== 'string'\n    || sourceRecord['callId'] === '') {\n    throw new Error(`${subject} message must have tool source`)\n  }\n  const content = messageRecord['content'] as unknown[]\n  const block = content[0]\n  if (content.length !== 1 || typeof block !== 'object' || block === null\n    || (block as Record<string, unknown>)['type'] !== 'tool-result'\n    || !Array.isArray((block as Record<string, unknown>)['content'])) {\n    throw new Error(`${subject} message must contain one tool-result block`)\n  }\n  if ((block as Record<string, unknown>)['toolCallId'] !== sourceRecord['callId']) {\n    throw new Error(`${subject} message has mismatched tool call ids`)\n  }\n}\n\n/** Whether an unknown value carries the current provider/model pair. */\nfunction hasProviderModel(value: unknown): boolean {\n  if (typeof value !== 'object' || value === null) return false\n  const pair = value as Record<string, unknown>\n  return typeof pair['provider'] === 'string' && pair['provider'].length > 0\n    && typeof pair['model'] === 'string' && pair['model'].length > 0\n}\n\n/** Reject request-header vocabulary removed with the legacy delta codec. */\nfunction assertSupportedRequestHeader(type: string, data: unknown, location: string): void {\n  if (type === 'request/header-delta') {\n    throw new Error(`${location} uses unsupported legacy request/header-delta format`)\n  }\n  if (type === 'request/header'\n    && data !== null && typeof data === 'object' && !Array.isArray(data)","sourceCodeStart":332,"sourceCodeEnd":368,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/core/session/src/index.ts#L332-L368","documentation":"Error \"${subject} message has mismatched tool call ids\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/core/session/src/index.ts:350 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Align the tool call ids between the tool call and its result."],"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"}