Problem
In DurableAgent.stream(), tool calls are executed via Promise.all. Inside executeTool, only FatalError is caught and converted to an error-text result — any other exception re-throws, causing Promise.all to reject and killing the entire agent stream.
This differs from the AI SDK's streamText, where individual tool errors are returned as error results to the model, allowing recovery.
Expected behaviour
Non-fatal tool exceptions should be converted to per-tool error results and sent back to the model so the agent can continue. Only FatalError / AbortError should break the stream.
Versions
| Package |
Version |
@workflow/ai |
4.0.1-beta.51 |
workflow |
4.0.1-beta.50 |
ai (Vercel AI SDK) |
6.0.49 |