{"record":{"id":"1f1e7696080d08c3","repo":"deepseek-ai/deepseek-harness","slug":"ralph-maxrounds-must-be-a-positive-safe-integer","errorCode":null,"errorMessage":"Ralph maxRounds must be a positive safe integer","messagePattern":"Ralph maxRounds must be a positive safe integer","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/workflow/tool-ralph/src/index.ts","lineNumber":211,"sourceCode":"    throw new TypeError('subagentProvider must be a non-empty normalized string')\n  }\n  if (!Number.isSafeInteger(maxRounds) || maxRounds < 1) {\n    throw new TypeError('maxRounds must be a positive safe integer')\n  }\n  if (!Number.isSafeInteger(maxHandoffChars) || maxHandoffChars < 1) {\n    throw new TypeError('maxHandoffChars must be a positive safe integer')\n  }\n  if (!Number.isSafeInteger(maxResultChars) || maxResultChars < 1) {\n    throw new TypeError('maxResultChars must be a positive safe integer')\n  }\n  return { subagentProvider, maxRounds, maxHandoffChars, maxResultChars }\n}\n\n/** Resolve one model-selected cap against the deployment ceiling. */\nfunction resolveMaxRounds(requested: number | undefined, ceiling: number): number {\n  const value = requested ?? ceiling\n  if (!Number.isSafeInteger(value) || value < 1) {\n    throw new TypeError('Ralph maxRounds must be a positive safe integer')\n  }\n  if (value > ceiling) {\n    throw new TypeError(`Ralph maxRounds ${value} exceeds the deployment ceiling ${ceiling}`)\n  }\n  return value\n}\n\n/** Require the configured route to mean a genuinely fresh structured child. */\nfunction requireFreshProvider(ctx: Context, name: string): SubagentProvider {\n  const provider = ctx.subagents.getProvider(name)\n  if (provider === undefined) {\n    throw new Error(`Ralph subagent provider \"${name}\" is not registered`)\n  }\n  if (!provider.capabilities.outputSchema) {\n    throw new Error(`Ralph subagent provider \"${name}\" does not support structured output`)\n  }\n  if (provider.inheritsParentContext) {\n    throw new Error(`Ralph subagent provider \"${name}\" inherits parent context; Ralph requires a fresh provider`)","sourceCodeStart":193,"sourceCodeEnd":229,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/workflow/tool-ralph/src/index.ts#L193-L229","documentation":"Error \"Ralph maxRounds must be a positive safe integer\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/workflow/tool-ralph/src/index.ts:211 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the Ralph maxRounds config value to a positive safe integer in cordis.yml."],"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"}