{"record":{"id":"710f34fd9b57fab7","repo":"deepseek-ai/deepseek-harness","slug":"maxhandoffchars-must-be-a-positive-safe-integer","errorCode":null,"errorMessage":"maxHandoffChars must be a positive safe integer","messagePattern":"maxHandoffChars must be a positive safe integer","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/workflow/tool-ralph/src/index.ts","lineNumber":199,"sourceCode":"  + 'opens a new child with no parent conversation or prior child session; the shared workspace is '\n  + 'long-term memory, and only a bounded structured report crosses rounds. The call returns when '\n  + 'a worker reports completion or a concrete blocker, or at the round limit. Ordinary long-running same-session work '\n  + 'belongs to goal tools.'\n\n/** Validate defaults even when a caller invokes apply() without Loader normalization. */\nfunction resolveConfig(config: Config): ResolvedConfig {\n  const subagentProvider = config.subagentProvider ?? 'spawn'\n  const maxRounds = config.maxRounds ?? 256\n  const maxHandoffChars = config.maxHandoffChars ?? 16_384\n  const maxResultChars = config.maxResultChars ?? 16_384\n  if (subagentProvider.length === 0 || subagentProvider !== subagentProvider.trim()) {\n    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}","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/workflow/tool-ralph/src/index.ts#L181-L217","documentation":"Error \"maxHandoffChars must be a positive safe integer\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/workflow/tool-ralph/src/index.ts:199 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass maxHandoffChars as a positive safe integer in the Ralph tool arguments."],"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"}