deepseek-ai/deepseek-harness · error · TypeError
blockedAfterConsecutiveRounds must be a positive safe intege
Error message
blockedAfterConsecutiveRounds must be a positive safe integer
What it means
Error "blockedAfterConsecutiveRounds must be a positive safe integer" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/goal/tool-goal/src/index.ts:129
/** Render policy guidance with its deployment-selected blocked threshold. */
function guidance(blockedAfter: number): string {
return 'Use goal tools for one long-running completion objective in the current session. '
+ 'create_goal may infer goal intent from a direct human request in any language; do not '
+ 'create a goal for routine single-turn work. Call get_goal before update_goal and copy its '
+ 'exact goal_id and revision. After session resume or fork, an active goal is disarmed: when '
+ 'a human asks to continue or resume in any wording or language, use update_goal action '
+ 'resume to rearm it. Mark complete only when the objective is actually achieved. Mark '
+ `blocked only after the same blocking condition persists for at least ${blockedAfter} `
+ 'consecutive goal rounds, and report that concrete condition in blocked_reason; difficulty, uncertainty, '
+ 'or useful remaining work is not blocked.'
}
/** Validate config even when apply is called directly outside Loader normalization. */
function resolveConfig(config: Config): ResolvedConfig {
const blockedAfter = config.blockedAfterConsecutiveRounds ?? 3
if (!Number.isSafeInteger(blockedAfter) || blockedAfter < 1) {
throw new TypeError('blockedAfterConsecutiveRounds must be a positive safe integer')
}
return { blockedAfterConsecutiveRounds: blockedAfter }
}
/** Whether optional text is meaningful rather than a strict-schema empty filler. */
function hasText(value: string | undefined): value is string {
return value !== undefined && value !== ''
}
/** Whether an optional round cap is meaningful rather than a strict-schema zero filler. */
function hasRoundCap(value: number | undefined): value is number {
return value !== undefined && value !== 0
}
/** Build the exact compare-and-set ref from model arguments. */
function goalRef(goalId: string, revision: number): GoalRef {
if (goalId.length === 0 || goalId !== goalId.trim()
|| !Number.isSafeInteger(revision) || revision < 1) {View on GitHub (pinned to b150a551b8)
When it happens
Trigger: Thrown at packages/goal/tool-goal/src/index.ts:129 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/7cc6c5cce8067af4.
Report an issue: GitHub.