Tool Calling in Laravel: Why Agents Quit After One Retry

A Laravel agent with one tool gets only two steps by default, so a single bad argument and its retry leave the user with an empty reply.

Setting #[MaxSteps] to your normal tool chain plus two, and adding #[RepairToolCalls], fixed every failure I scripted on laravel/ai v1.2.0.

Only ValidationException is returned to the model; any other exception inside a tool escapes prompt() and fails the whole request.

Read the full post

Read the full post