deepseek-ai/deepseek-harness · error

SESSION_QUERY_CORRUPT_SESSION

SESSION_QUERY_CORRUPT_SESSION

Error message

session event history is corrupt

What it means

Model-safe projection of `SESSION_QUERY_CORRUPT_SESSION`: the underlying session log failed structural validation, so the session event history cannot be replayed. The dictionary entry deliberately hides cause detail from the model, exposing only the stable code and this fixed message.

Solutions

  1. Rebuild or reset the corrupt session event history storage; restore from a backup if available.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/session-query/tool-session-query/src/service-boundary.ts:27 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/a1c20165e4182233. Report an issue: GitHub.

Appendix: source

Thrown at packages/session-query/tool-session-query/src/service-boundary.ts:27

import {
  SessionQueryError,
  type SessionQueryErrorCode,
} from '@deepseek-ai/dsh-session-query'

interface ModelSafeServiceFailure {
  readonly code: SessionQueryErrorCode | 'SESSION_QUERY_TOOL_FAILED'
  readonly message: string
}

const UNPRINTABLE_SERVICE_ERROR = '[unprintable session query failure]'

const SAFE_SESSION_QUERY_FAILURES = {
  SESSION_QUERY_ABORTED: {
    code: 'SESSION_QUERY_ABORTED',
    message: 'session query was cancelled',
  },
  SESSION_QUERY_CORRUPT_SESSION: {
    code: 'SESSION_QUERY_CORRUPT_SESSION',
    message: 'session event history is corrupt',
  },
  SESSION_QUERY_EVENT_NOT_FOUND: {
    code: 'SESSION_QUERY_EVENT_NOT_FOUND',
    message: 'session event was not found',
  },
  SESSION_QUERY_INDEX_FAILED: {
    code: 'SESSION_QUERY_INDEX_FAILED',
    message: 'session search index is unavailable',
  },
  SESSION_QUERY_INVALID_CONFIG: {
    code: 'SESSION_QUERY_TOOL_FAILED',
    message: 'session query operation failed',
  },
  SESSION_QUERY_INVALID_CURSOR: {
    code: 'SESSION_QUERY_INVALID_CURSOR',
    message: 'session search continuation is invalid',
  },

View on GitHub (pinned to b150a551b8)