deepseek-ai/deepseek-harness · error · SessionQueryError

SESSION_QUERY_INVALID_CURSOR

SESSION_QUERY_INVALID_CURSOR

Error message

session-search cursor is invalid

What it means

Error "session-search cursor is invalid" thrown in deepseek-ai/deepseek-harness.

Source

Thrown at packages/session-query/session-query-sqlite/src/index.ts:970

  }
}

function encodeCursor(payload: CursorPayload): SessionSearchCursorValue {
  return SessionSearchCursor(Buffer.from(JSON.stringify(payload), 'utf8').toString('base64url'))
}

function decodeCursor(
  cursor: SessionSearchCursorValue,
  instance: string,
  scope: CursorPayload['scope'],
  fingerprint: string,
  generation: string,
): number {
  let decoded: Partial<CursorPayload>
  try {
    decoded = JSON.parse(Buffer.from(cursor, 'base64url').toString('utf8')) as Partial<CursorPayload>
  } catch (error: unknown) {
    throw invalidCursor(error)
  }
  if (
    decoded.version !== 1
    || decoded.instance !== instance
    || decoded.scope !== scope
    || decoded.fingerprint !== fingerprint
    || !Number.isSafeInteger(decoded.offset)
    || decoded.offset === undefined
    || decoded.offset < 0
  ) {
    throw invalidCursor(new Error('cursor does not belong to this normalized request'))
  }
  if (decoded.generation !== generation) {
    throw new SessionQueryError(
      'session-search cursor is stale because its relevant corpus changed',
      'SESSION_QUERY_STALE_CURSOR',
    )
  }

View on GitHub (pinned to b150a551b8)

Solutions

  1. Request the first page again without a cursor or with a cursor from a fresh search.

When it happens

Trigger: Thrown at packages/session-query/session-query-sqlite/src/index.ts:970 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24). Data as JSON: /api/errors/9af05ec4ec57b093. Report an issue: GitHub.