{"record":{"id":"e14ff67cb0db4f05","repo":"deepseek-ai/deepseek-harness","slug":"search-aborted","errorCode":"SEARCH_ABORTED","errorMessage":"${toolName} was aborted before completion (tool timeout or caller cancellation)","messagePattern":"(.+?) was aborted before completion \\(tool timeout or caller cancellation\\)","errorType":"exception","errorClass":"SearchError","httpStatus":null,"severity":"error","filePath":"packages/fs/tool-fs-search/src/search-core.ts","lineNumber":225,"sourceCode":" * @param exec - the tool-execution context; supplies the session cwd and the abort signal.\n * @param toolName - `glob` or `grep`, used in error messages.\n * @param argv - the ripgrep arguments (every model value an unquoted argv element; no shell layer exists).\n * @param rawOutputMaxBytes - cap on the complete raw stdout the tool will parse.\n * @param graceMs - the seam's terminate-escalation grace period.\n * @param stderrMaxBytes - cap on the retained stderr diagnostic tail.\n * @returns the complete stdout, the zero-result flag, and the resolved workdir.\n */\nexport async function runRipgrep(\n  ctx: Context,\n  exec: ToolExecution,\n  toolName: string,\n  argv: readonly string[],\n  rawOutputMaxBytes: number,\n  graceMs: number,\n  stderrMaxBytes: number,\n): Promise<RipgrepRun> {\n  if (exec.signal.aborted) {\n    throw new SearchError(`${toolName} was aborted before completion (tool timeout or caller cancellation)`, 'SEARCH_ABORTED')\n  }\n  const cwd = exec.agent?.session.header.cwd\n  const workdir = cwd ?? process.cwd()\n  let handle: SubprocessHandle\n  try {\n    handle = ctx.subprocess.spawn({\n      argv: [await resolveRgPath(), '--no-config', ...argv],\n      cwd: workdir,\n      stdio: {\n        stdin: 'ignore',\n        stdout: { maxBytes: rawOutputMaxBytes },\n        stderr: { maxBytes: stderrMaxBytes },\n      },\n      graceMs,\n      signal: exec.signal,\n    } satisfies SubprocessSpawnSpec)\n  } catch (error: unknown) {\n    // Node's spawn() throws synchronously for a NUL in argv, and the local","sourceCodeStart":207,"sourceCodeEnd":243,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/fs/tool-fs-search/src/search-core.ts#L207-L243","documentation":"Error \"${toolName} was aborted before completion (tool timeout or caller cancellation)\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/fs/tool-fs-search/src/search-core.ts:225 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"}