Symptom
A streamed run that uses tools stops right after the tool call and returns nothing when the model sends an empty text part first. The linked issue does not give an exception class for that stop.
Evidence what you'll see
- The report's versions are Python
3.11.13and Pydantic AI0.4.2. - The stop happens while streaming, and only when the agent has tools.
Why it happens
The empty text part that arrived with the tool call was treated as the model's answer, so the run ended instead of waiting for the tool result.
Affected versions
Pydantic AI 0.4.2, Python 3.11.13. The linked issue does not name an operating system.
Fix steps
0 of 1 done
Your check marks stay in this browser only.
How to check it worked
- Stream a run that calls a tool and confirm the agent continues after the tool result and returns an answer.
If it still fails
- The linked issue does not describe this stop on
v0.4.7. On0.4.2the run ends after the tool call.
Sources and credit
Summarized in our own words from these public reports. Credit goes to their authors.
Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change
Hit an error we don't cover? Submit it