{"record":{"id":"07bf750b91a60a42","repo":"deepseek-ai/deepseek-harness","slug":"session-query-stale-cursor","errorCode":"SESSION_QUERY_STALE_CURSOR","errorMessage":"session history changed while paging; retry the complete search call","messagePattern":"session history changed while paging; retry the complete search call","errorType":"error_code","errorClass":"HarnessError","httpStatus":null,"severity":"error","filePath":"packages/session-query/tool-session-query/src/service-boundary.ts","lineNumber":83,"sourceCode":"  },\n  SESSION_QUERY_INVALID_WINDOW: {\n    code: 'SESSION_QUERY_INVALID_WINDOW',\n    message: 'session event window is invalid',\n  },\n  SESSION_QUERY_PERSISTENCE_FAILED: {\n    code: 'SESSION_QUERY_PERSISTENCE_FAILED',\n    message: 'session history storage is unavailable',\n  },\n  SESSION_QUERY_SEARCH_DISABLED: {\n    code: 'SESSION_QUERY_SEARCH_DISABLED',\n    message: 'session search is disabled in this deployment',\n  },\n  SESSION_QUERY_SESSION_NOT_FOUND: {\n    code: 'SESSION_QUERY_SESSION_NOT_FOUND',\n    message: 'session was not found',\n  },\n  SESSION_QUERY_STALE_CURSOR: {\n    code: 'SESSION_QUERY_STALE_CURSOR',\n    message: 'session history changed while paging; retry the complete search call',\n  },\n  SESSION_QUERY_SOURCE_CONFLICT: {\n    code: 'SESSION_QUERY_TOOL_FAILED',\n    message: 'session query operation failed',\n  },\n} satisfies Record<SessionQueryErrorCode, ModelSafeServiceFailure>\n\nfunction unauthorizedTarget(): HarnessError {\n  return new HarnessError(\n    'session target is outside the caller workspace',\n    'SESSION_QUERY_TOOL_UNAUTHORIZED',\n  )\n}\n\nasync function call<Value>(\n  ctx: Context,\n  signal: AbortSignal,","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/session-query/tool-session-query/src/service-boundary.ts#L65-L101","documentation":"Error \"session history changed while paging; retry the complete search call\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/session-query/tool-session-query/src/service-boundary.ts:83 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the complete search call from the start; do not reuse continuation state across concurrent history changes."],"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"}