Session

When Agents Loop: Cutting 14 Tool Calls to 2

Your booking agent just charged a customer fourteen times for the same flight. It called the booking tool, got a vague response, was not sure it worked, and tried again. And again. Fourteen calls where two would do, twenty one seconds wasted, a pile of burned tokens. The cause is simple: when a tool answer is unclear, the agent cannot tell if it succeeded, so it retries. The fix is to make the answer impossible to misread. Give every tool a clear done or failed signal so the agent knows when to stop, block repeat calls before they run, and cap how many times any one tool can fire as a safety net. That takes fourteen calls down to two, and twenty one seconds to four. You leave with all three patterns ready to drop into your own agents.


Outline: • The Token Waste Problem • DebounceHook: Detect and Block Duplicates • Clear SUCCESS/FAILED States: Prevention by Design • LimitToolCounts: Hard Ceiling Enforcement • Production Patterns and Wrap-Up

Elizabeth Fuentes Leone

Developer Advocate

San Francisco, California, United States

Actions

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top