deepseek-ai/deepseek-harness · error · GoalError
GOAL_INVALID_MAX_ROUNDS
GOAL_INVALID_MAX_ROUNDS
Error message
maxGoalRounds must be a positive safe integer
What it means
Error "maxGoalRounds must be a positive safe integer" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/goal/goal/src/index.ts:144
/** Process-local cache plus activation intent crossing the synchronous append boundary. */
interface GoalCache {
readonly state: GoalFoldState
activation: GoalActivation
observedSeq: number
pendingActivation: { readonly seq: number; readonly activation: GoalActivation } | undefined
}
/** Validated create input with every deployment default materialized. */
interface ResolvedCreateGoal {
readonly objective: string
readonly maxGoalRounds: number
}
/** Validate a caller-visible positive safe-integer round cap. */
function resolveMaxGoalRounds(value: number): number {
if (!Number.isSafeInteger(value) || value < 1) {
throw new GoalError('maxGoalRounds must be a positive safe integer', 'GOAL_INVALID_MAX_ROUNDS')
}
return value
}
/** Validate and normalize an objective at the domain boundary. */
function resolveObjective(value: string): string {
if (typeof value !== 'string' || value.trim().length === 0) {
throw new GoalError('goal objective must be a non-empty string', 'GOAL_INVALID_OBJECTIVE')
}
return value.trim()
}
/** Materialize deployment defaults and validate one create request. */
function resolveCreateGoal(request: CreateGoalRequest, defaultMaxGoalRounds: number): ResolvedCreateGoal {
return {
objective: resolveObjective(request.objective),
maxGoalRounds: resolveMaxGoalRounds(request.maxGoalRounds ?? defaultMaxGoalRounds),
}View on GitHub (pinned to b150a551b8)
When it happens
Trigger: Thrown at packages/goal/goal/src/index.ts:144 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/eaa153af076e34d6.
Report an issue: GitHub.