{"record":{"id":"43a3a79fefdd67e3","repo":"deepseek-ai/deepseek-harness","slug":"search-raw-output-overflow","errorCode":"SEARCH_RAW_OUTPUT_OVERFLOW","errorMessage":"${toolName} produced ${inlineBytes} bytes of raw output, over the ${rawOutputMaxBytes}-byte cap; narrow pattern, path, or include and retry","messagePattern":"(.+?) produced (.+?) bytes of raw output, over the (.+?)-byte cap; narrow pattern, path, or include and retry","errorType":"exception","errorClass":"SearchError","httpStatus":null,"severity":"error","filePath":"packages/fs/tool-fs-search/src/search-core.ts","lineNumber":144,"sourceCode":"  if (/regex parse error|error parsing glob/i.test(stderr)) {\n    return new SearchError(`${toolName} pattern rejected by ripgrep: ${stderr}`, 'SEARCH_INVALID_PATTERN')\n  }\n  return new SearchError(`${toolName} search failed (exit ${exitCode})${stderr.length > 0 ? `: ${stderr}` : ''}`, 'SEARCH_FAILED')\n}\n\n/**\n * Acquire the COMPLETE raw stdout of a finished run, enforcing\n * `rawOutputMaxBytes` on the in-memory transport. A truncated result means the\n * subprocess seam could not retain complete stdout within the requested\n * budget, so the tool fails clearly instead of parsing a silently-partial\n * stream.\n */\nfunction completeStdout(toolName: string, stdout: SubprocessOutputRead, rawOutputMaxBytes: number): string {\n  const narrow = 'narrow pattern, path, or include and retry'\n  if (!stdout.lossy) {\n    const inlineBytes = Buffer.byteLength(stdout.text, 'utf8')\n    if (inlineBytes > rawOutputMaxBytes) {\n      throw new SearchError(\n        `${toolName} produced ${inlineBytes} bytes of raw output, over the ${rawOutputMaxBytes}-byte cap; ${narrow}`,\n        'SEARCH_RAW_OUTPUT_OVERFLOW',\n      )\n    }\n    return stdout.text\n  }\n  throw new SearchError(\n    `${toolName} produced more raw output than the subprocess seam retained within the ${rawOutputMaxBytes}-byte cap; ${narrow}`,\n    'SEARCH_RAW_OUTPUT_OVERFLOW',\n  )\n}\n\nlet rgPathPromise: Promise<string> | undefined\n\n/**\n * The packaged ripgrep binary path, resolved lazily once per process.\n *\n * A single-file runtime uses the executable's `-rg` sidecar because a native","sourceCodeStart":126,"sourceCodeEnd":162,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/fs/tool-fs-search/src/search-core.ts#L126-L162","documentation":"Error \"${toolName} produced ${inlineBytes} bytes of raw output, over the ${rawOutputMaxBytes}-byte cap; narrow pattern, path, or include and retry\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/fs/tool-fs-search/src/search-core.ts:144 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"}