{"record":{"id":"f0f7d19c54769ae6","repo":"vercel/ai","slug":"workflowagent-provider-executed-tool-toolcall","errorCode":null,"errorMessage":"[WorkflowAgent] Provider-executed tool \"${toolCall.toolName}\" (${toolCall.toolCallId}) did not receive a result from the stream. This may indicate a provider issue.","messagePattern":"\\[WorkflowAgent\\] Provider-executed tool \"(.+?)\" \\((.+?)\\) did not receive a result from the stream\\. This may indicate a provider issue\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/workflow/src/workflow-agent.ts","lineNumber":2869,"sourceCode":"  return {\n    inputTokens,\n    outputTokens,\n    totalTokens: inputTokens + outputTokens,\n  } as LanguageModelUsage;\n}\n\nasync function resolveProviderToolResult(\n  toolCall: { toolCallId: string; toolName: string; input: unknown },\n  providerExecutedToolResults?: Map<\n    string,\n    { toolCallId: string; toolName: string; result: unknown; isError?: boolean }\n  >,\n  tools?: ToolSet,\n  download?: DownloadFunction,\n): Promise<WorkflowToolExecutionResult> {\n  const streamResult = providerExecutedToolResults?.get(toolCall.toolCallId);\n  if (!streamResult) {\n    console.warn(\n      `[WorkflowAgent] Provider-executed tool \"${toolCall.toolName}\" (${toolCall.toolCallId}) ` +\n        `did not receive a result from the stream. This may indicate a provider issue.`,\n    );\n    return {\n      modelResult: {\n        type: 'tool-result' as const,\n        toolCallId: toolCall.toolCallId,\n        toolName: toolCall.toolName,\n        output: {\n          type: 'text' as const,\n          value: '',\n        },\n      },\n      rawOutput: '',\n      isError: false,\n    };\n  }\n","sourceCodeStart":2851,"sourceCodeEnd":2887,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/workflow/src/workflow-agent.ts#L2851-L2887","documentation":"When executing a provider-executed (client/host-side) tool inside a WorkflowAgent, the code looks up the tool result that should have arrived on the stream for that tool call ID. If no result is found, it warns that the provider stream was incomplete and fabricates a fallback tool-error result so the loop can continue. This indicates the provider did not deliver the tool output.","triggerScenarios":"A workflow step finishes with pending provider-executed tool calls whose results were not included in the provider-executedToolResults map from the stream — e.g. the stream ended early, results were dropped, or the provider failed to send tool output for that toolCallId.","commonSituations":"Provider outages or truncated streams mid tool execution; misconfigured provider-executed tools; resumable streams resumed past the chunk containing the tool result.","solutions":["Verify the provider actually returns results for the provider-executed tool (check provider status/logs for that request).","Check that the stream was not truncated/aborted before the tool-result chunk arrived; enable retries or stream resumption.","Confirm tool definitions are correctly marked as provider-executed and the toolCallId mapping is preserved.","Handle the fallback tool-error result gracefully in your workflow if partial failure is expected."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"// the agent already falls back to a tool-error result; handle it downstream\nif (result.type === 'tool-result' && result.isError) {\n  // reconcile/retry or surface to user\n}","preventionTips":["Monitor provider stream health; enable retries/resumable streams","Log toolCallIds lacking stream results to correlate with provider incidents","Verify provider-executed tool configuration per provider"],"tags":["tools","streaming","workflow","provider"],"backgroundTag":"missing-tool-result","analyzedSha":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}