{"record":{"id":"4ffd9d89c6767c4c","repo":"deepseek-ai/deepseek-harness","slug":"tool-session-query-operation-failed-diagnos","errorCode":null,"errorMessage":"tool-session-query: ${operation} failed: ${diagnostic}","messagePattern":"tool-session-query: (.+?) failed: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/session-query/tool-session-query/src/service-boundary.ts","lineNumber":124,"sourceCode":"  try {\n    const value = await invoke()\n    signal.throwIfAborted()\n    return value\n  } catch (error: unknown) {\n    signal.throwIfAborted()\n    throw sanitizeError(ctx, operation, error)\n  }\n}\n\nfunction sanitizeError(\n  ctx: Context,\n  operation: string,\n  error: unknown,\n): HarnessError {\n  const generic = genericFailure()\n  const diagnostic = fullError(error)\n  try {\n    ctx.logger.warn(`tool-session-query: ${operation} failed: ${diagnostic}`)\n    if (error instanceof SessionQueryError) {\n      const code: unknown = error.code\n      const failure = typeof code === 'string' && Object.hasOwn(SAFE_SESSION_QUERY_FAILURES, code)\n        ? SAFE_SESSION_QUERY_FAILURES[code as SessionQueryErrorCode]\n        : undefined\n      if (failure !== undefined && failure.code !== 'SESSION_QUERY_TOOL_FAILED') {\n        return new SessionQueryError(failure.message, failure.code)\n      }\n    }\n    if (error instanceof HarnessError && error.code === 'SESSION_QUERY_TOOL_UNAUTHORIZED') {\n      return unauthorizedTarget()\n    }\n  } catch {\n    return generic\n  }\n  return generic\n}\n","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/session-query/tool-session-query/src/service-boundary.ts#L106-L142","documentation":"Error \"tool-session-query: ${operation} failed: ${diagnostic}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/session-query/tool-session-query/src/service-boundary.ts:124 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Apply the diagnostic for the failed operation (fix filters, enable search, verify session id) and retry the tool call."],"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"}