vercel/ai · warning

[WorkflowAgent] Provider-executed tool "${toolCall.toolName}

Error message

[WorkflowAgent] Provider-executed tool "${toolCall.toolName}" (${toolCall.toolCallId}) did not receive a result from the stream. This may indicate a provider issue.

What it means

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.

Source

Thrown at packages/workflow/src/workflow-agent.ts:2869

  return {
    inputTokens,
    outputTokens,
    totalTokens: inputTokens + outputTokens,
  } as LanguageModelUsage;
}

async function resolveProviderToolResult(
  toolCall: { toolCallId: string; toolName: string; input: unknown },
  providerExecutedToolResults?: Map<
    string,
    { toolCallId: string; toolName: string; result: unknown; isError?: boolean }
  >,
  tools?: ToolSet,
  download?: DownloadFunction,
): Promise<WorkflowToolExecutionResult> {
  const streamResult = providerExecutedToolResults?.get(toolCall.toolCallId);
  if (!streamResult) {
    console.warn(
      `[WorkflowAgent] Provider-executed tool "${toolCall.toolName}" (${toolCall.toolCallId}) ` +
        `did not receive a result from the stream. This may indicate a provider issue.`,
    );
    return {
      modelResult: {
        type: 'tool-result' as const,
        toolCallId: toolCall.toolCallId,
        toolName: toolCall.toolName,
        output: {
          type: 'text' as const,
          value: '',
        },
      },
      rawOutput: '',
      isError: false,
    };
  }

View on GitHub (pinned to 69428b1f8b)

Solutions

  1. Verify the provider actually returns results for the provider-executed tool (check provider status/logs for that request).
  2. Check that the stream was not truncated/aborted before the tool-result chunk arrived; enable retries or stream resumption.
  3. Confirm tool definitions are correctly marked as provider-executed and the toolCallId mapping is preserved.
  4. Handle the fallback tool-error result gracefully in your workflow if partial failure is expected.
Defensive patterns

Strategy: fallback

Try / catch

// the agent already falls back to a tool-error result; handle it downstream
if (result.type === 'tool-result' && result.isError) {
  // reconcile/retry or surface to user
}

Prevention

When it happens

Trigger: 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.

Common situations: Provider outages or truncated streams mid tool execution; misconfigured provider-executed tools; resumable streams resumed past the chunk containing the tool result.

Related errors


AI-assisted analysis of vercel/ai@69428b1f8b (2026-08-30). Data as JSON: /api/errors/f0f7d19c54769ae6. Report an issue: GitHub.