{"record":{"id":"8bbea8b919998409","repo":"deepseek-ai/deepseek-harness","slug":"tool-rawname-requires-task-based-execution-w","errorCode":null,"errorMessage":"Tool \"${rawName}\" requires task-based execution, which this bridge does not support","messagePattern":"Tool \"(.+?)\" requires task-based execution, which this bridge does not support","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/mcp/mcp-client/src/tools.ts","lineNumber":313,"sourceCode":" * raw MCP tool name and sends an uncached `tools/call` request with it (never\n * the public name), with abort signal and timeout, then maps the result to\n * harness ContentBlocks. Owning the raw request prevents the SDK's internal\n * per-page schema cache from pre-validating a different contract.\n *\n * When the MCP server returns `isError: true`, the executor throws so that\n * the ToolRuntime's catch path produces an `isError` result for the model.\n */\nfunction createExecutor(\n  client: Client,\n  ctx: Context,\n  rawName: string,\n  taskRequired: boolean,\n  opts: ToolBridgeOptions,\n  projections: WeakMap<ToolExecution, PreparedProjection>,\n): ToolDefinition['execute'] {\n  return async (args: unknown, exec: ToolExecution) => {\n    if (taskRequired) {\n      throw new Error(`Tool \"${rawName}\" requires task-based execution, which this bridge does not support`)\n    }\n    // The agent loop passes `JSON.parse(model_arguments)` which is usually an\n    // object, but can be any JSON value if the model misbehaves (outputs a bare\n    // string/number/null). Fallback to {} lets the MCP server produce a\n    // specific \"missing required param\" error the model can learn from.\n    const argsObj = (typeof args === 'object' && args !== null ? args : {}) as Record<string, unknown>\n    const result = await callToolUncached(client, rawName, argsObj, exec, opts)\n\n    // The SDK may return a legacy `toolResult` shape; normalize to content array.\n    if (!Array.isArray(result.content)) {\n      const rendered: unknown = 'toolResult' in result\n        ? JSON.stringify(result.toolResult)\n        : '(no output)'\n      const text = typeof rendered === 'string' ? rendered : '(no output)'\n      if (result.isError === true) throw new Error(text)\n      return {\n        content: [{ type: 'text', text }],\n        ...result.structuredContent !== undefined","sourceCodeStart":295,"sourceCodeEnd":331,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/mcp/mcp-client/src/tools.ts#L295-L331","documentation":"Error \"Tool \"${rawName}\" requires task-based execution, which this bridge does not support\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/mcp/mcp-client/src/tools.ts:313 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Do not call tools that require task-based execution through this bridge."],"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"}