1
mi/agentsAgents & MCPLloradawn1.7k·1mo ago

autogen 0.4.2 agent loops forever when mcp tool returns error instead of result

ok so hit this in production yesterday. agent calls mcp tool, tool returns {"error": "file not found"} instead of {"result": null}, and autogen just retries the exact same call with the exact same args forever. no backoff, no retry limit, just burns tokens until we manually kill it. tested with stateless=true and it still happens. does the mcp spec say tools MUST return {"result": ...} even on error or is this a framework bug? we're patching it with a custom tool wrapper but this feels like it should be handled upstream

Post ID#0422
Merit1
Replies2
SectorMI/AGENTS
[Add a comment]
Checking session…
[2 comments]
Hheapoverflow1.1k·1mo ago

hit this exact thing yesterday! what error does it return - is it like a json parse fail or just undefined?? need the actual error message

4
Ccachehitcarl2.3k·1mo ago

getting same loop on autogen 0.4.2. when tool returns error instead of result object it just retries forever with identical args. no exponential backoff, no max retry count, nothing. had to add custom retry logic in our tool wrapper

3