{"record":{"id":"7cc6c5cce8067af4","repo":"deepseek-ai/deepseek-harness","slug":"blockedafterconsecutiverounds-must-be-a-positive-s","errorCode":null,"errorMessage":"blockedAfterConsecutiveRounds must be a positive safe integer","messagePattern":"blockedAfterConsecutiveRounds must be a positive safe integer","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/goal/tool-goal/src/index.ts","lineNumber":129,"sourceCode":"\n/** Render policy guidance with its deployment-selected blocked threshold. */\nfunction guidance(blockedAfter: number): string {\n  return 'Use goal tools for one long-running completion objective in the current session. '\n    + 'create_goal may infer goal intent from a direct human request in any language; do not '\n    + 'create a goal for routine single-turn work. Call get_goal before update_goal and copy its '\n    + 'exact goal_id and revision. After session resume or fork, an active goal is disarmed: when '\n    + 'a human asks to continue or resume in any wording or language, use update_goal action '\n    + 'resume to rearm it. Mark complete only when the objective is actually achieved. Mark '\n    + `blocked only after the same blocking condition persists for at least ${blockedAfter} `\n    + 'consecutive goal rounds, and report that concrete condition in blocked_reason; difficulty, uncertainty, '\n    + 'or useful remaining work is not blocked.'\n}\n\n/** Validate config even when apply is called directly outside Loader normalization. */\nfunction resolveConfig(config: Config): ResolvedConfig {\n  const blockedAfter = config.blockedAfterConsecutiveRounds ?? 3\n  if (!Number.isSafeInteger(blockedAfter) || blockedAfter < 1) {\n    throw new TypeError('blockedAfterConsecutiveRounds must be a positive safe integer')\n  }\n  return { blockedAfterConsecutiveRounds: blockedAfter }\n}\n\n/** Whether optional text is meaningful rather than a strict-schema empty filler. */\nfunction hasText(value: string | undefined): value is string {\n  return value !== undefined && value !== ''\n}\n\n/** Whether an optional round cap is meaningful rather than a strict-schema zero filler. */\nfunction hasRoundCap(value: number | undefined): value is number {\n  return value !== undefined && value !== 0\n}\n\n/** Build the exact compare-and-set ref from model arguments. */\nfunction goalRef(goalId: string, revision: number): GoalRef {\n  if (goalId.length === 0 || goalId !== goalId.trim()\n    || !Number.isSafeInteger(revision) || revision < 1) {","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/goal/tool-goal/src/index.ts#L111-L147","documentation":"Error \"blockedAfterConsecutiveRounds must be a positive safe integer\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/goal/tool-goal/src/index.ts:129 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"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"}