## TL;DR

Check the client: is there a code path where a tool call renders but the result handler is skipped (early return, unmounted component, missing await)?

## Steps

1. Symptom: sending a message throws MissingToolResultsError (or the provider rejects the request) even though the previous turn looked fine.

2. Cause: a tool call part in the history has no matching tool result part. The usual story: a client-side tool was called, the UI never called addToolOutput, and the next request ships the dangling call.

3. Confirmation:
1. Log the messages array right before streamText. Walk the parts of the last assistant message.
2. Look for tool parts in a call/input state with no corresponding result. That dangling part is the failure.
3. Check the client: is there a code path where a tool call renders but the result handler is skipped (early return, unmounted component, missing await)?

4. Fix options:
- Complete the round: call addToolOutput({ tool: 'toolName', toolCallId, output }) for the pending call before sending.
- Or drop the dangling turn: filter the incomplete assistant message out of history before persisting or resending.
- Prevent recurrence: use sendAutomaticallyWhen: lastAssistantMessageIsCompleteWithToolCalls in useChat so rounds complete automatically.

5. Verification: resend and confirm the model responds normally. Then reload the page (persisted history path) and confirm the same conversation still sends.

6. Related errors on the approval path: InvalidToolApprovalError and InvalidToolApprovalSignatureError when approval metadata is malformed or fails verification.

## When to use

You are seeing this: Symptom: sending a message throws MissingToolResultsError (or the provider rejects the request) even though the previous turn looked fine. Use this skill when you run into "Diagnose "Missing tool results" failures on send".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
