You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
@tanstack/ai: Lazy tool execution returns error even when the requested tool is already discovered #788
This can happen if models hallucinate or in long context scenarios just overlook the already discovered tool and request a discovery.
Additionally, can DISCOVERY_TOOL_NAME be exported so that in custom compaction scenarios the const can be used instead of hard-coding the name which might change in future?
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
Not needed
Screenshots or Videos (Optional)
No response
Do you intend to try to help solve this bug with your own PR?
No response
Terms & Code of Conduct
I agree to follow this project's Code of Conduct
I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
changed the title [-]@tanstack/ai: Lazy tool execution should not return error when the requested tool is already in discoveredTools[/-][+]@tanstack/ai: Lazy tool execution returns error even when the requested tool is already discovered[/+]on Jun 18, 2026
Activity
[-]@tanstack/ai: Lazy tool execution should not return error when the requested tool is already in discoveredTools[/-][+]@tanstack/ai: Lazy tool execution returns error even when the requested tool is already discovered[/+]fix(ai): keep lazy-tool discovery callable when re-requested after al…