deepseek-ai/deepseek-harness · error · Error
${path}.maxRetries must be a non-negative safe integer
Error message
${path}.maxRetries must be a non-negative safe integer What it means
Error "${path}.maxRetries must be a non-negative safe integer" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/llm/llm/src/retry-policy.ts:168
config: RetryPolicyConfig | undefined,
path: string,
): ResolvedRetryPolicy {
if (config === undefined) {
return Object.freeze({
mode: 'normal',
maxRetries: DEFAULT_MAX_RETRIES,
retryableCodes: DEFAULT_RETRYABLE_CODES,
...resolveBackoff(undefined, `${path}.backoff`),
})
}
switch (config.mode) {
case 'normal': {
validateKeys(config, NORMAL_POLICY_KEYS, path)
const maxRetries = config.maxRetries ?? DEFAULT_MAX_RETRIES
const retryableCodes = config.retryableCodes ?? [...DEFAULT_RETRYABLE_CODES]
if (!Number.isSafeInteger(maxRetries) || maxRetries < 0) {
throw new Error(`${path}.maxRetries must be a non-negative safe integer`)
}
if (retryableCodes.length === 0) {
throw new Error(`${path}.retryableCodes must not be empty`)
}
if (retryableCodes.some(code => typeof code !== 'string' || code.length === 0)) {
throw new Error(`${path}.retryableCodes must contain only non-empty strings`)
}
if (new Set(retryableCodes).size !== retryableCodes.length) {
throw new Error(`${path}.retryableCodes must not contain duplicates`)
}
return Object.freeze({
mode: 'normal',
maxRetries,
retryableCodes: Object.freeze([...retryableCodes]),
...resolveBackoff(config.backoff, `${path}.backoff`),
})
}
case 'always':View on GitHub (pinned to b150a551b8)
Solutions
- Set maxRetries to a non-negative safe integer.
When it happens
Trigger: Thrown at packages/llm/llm/src/retry-policy.ts:168 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/11e45dd7e5ba9da4.
Report an issue: GitHub.