Playground crashes on maxSteps limits reached
Once receiving following error in console playground crashes with white screen:
Uncaught Error: Stream finished with reason tool-calls, try increasing maxSteps
Note: increasing maxSteps in playground doesn't help. crash still happens after 5th tool call
8 Replies
📝 Created GitHub issue: https://github.com/mastra-ai/mastra/issues/8772
GitHub
[DISCORD:1426950306352332911] Playground crashes on maxSteps limits...
This issue was created from Discord post: https://discord.com/channels/1309558646228779139/1426950306352332911 Once receiving following error in console playground crashes with white screen: Uncaug...
Hi @Guria ! Are you still running into this issue on latest?
@Romain surprisingly it wasn't fixed.
mastra 0.16.0-alpha.1

ah wait. these question was related the crash
@Romain ok crash didn't happened, but also there is no output after reaching limit with tool calls
it just stops on tool call without producinag any error or chat output

I see, thanks for testing that out! The thing is I don't believe there is an error generated when using
maxSteps
🤔so is this expected output?
or should we allow model to make final summary as last step?
not sure if that is good idea
That is the expected output. There is a better approach now though, which is to use the
stopWhen
option (which is not available in the playground), but it gives you more flexibility on how to handle when to stop the agentic loop. This is directly derived from the ai-sdk https://ai-sdk.dev/docs/agents/loop-control#stop-conditionsLoop Control
Control agent execution with built-in loop management using stopWhen and prepareStep