Hello,
I am not sure if this has been brought up before, but I could not find a similar topic here or in github issues.
I am using /sessions/runs endpoint to re-hydrate a session and some tools are not showing up on refresh. The issue seems to be with how agno aggregates tools with the RunPaused event present. If a tool call happens before the pause event, it is not represented in the tools array returned by the endpoint.
Here is a simple example you can replicate the issue with:
def subtract(a: float, b: float) -> float:
"""Subtract b from a.
Args:
a: First number.
b: Number to subtract.
"""
return a - b
@tool(requires_confirmation=True)
def multiply(a: float, b: float) -> float:
"""Multiply two numbers.
Args:
a: First number.
b: Second number.
"""
return a * b
With this example, if the subtract is called after multiply everything works as expected. But, if subtract is called before, the tools array only returns the multiply tool call.
You can try these prompt to test with:
multiply 5 by 5 and then subtract 5 from the result - works
subtract 5 from 25, then multiply 5 by 5 - does not work as expected
Thank you for your help.
