()
| 464 | const scopeLabel = scope === 'subagent' ? 'subagent ' : '' |
| 465 | |
| 466 | const fireToolExecution = () => { |
| 467 | const pendingPromise = (async () => { |
| 468 | return executeToolAndReport(toolCallId, context, execContext, options) |
| 469 | })().catch((err) => { |
| 470 | logger.error(`Parallel ${scopeLabel}tool execution failed`, { |
| 471 | toolCallId, |
| 472 | toolName, |
| 473 | error: toError(err).message, |
| 474 | }) |
| 475 | return { |
| 476 | status: MothershipStreamV1ToolOutcome.error, |
| 477 | message: 'Tool execution failed', |
| 478 | data: { error: 'Tool execution failed' }, |
| 479 | } |
| 480 | }) |
| 481 | registerPendingToolPromise(context, toolCallId, pendingPromise) |
| 482 | } |
| 483 | |
| 484 | if (options.interactive === false) { |
| 485 | if (options.autoExecuteTools !== false) { |
no test coverage detected