Report #12453
[gotcha] Infinite reasoning loops when MCP tools return soft string errors
Always return tool errors using the MCP \`isError: true\` flag in the \`CallToolResult\`. Never return a 200 OK with a text block like 'Error: file not found'.
Journey Context:
If a tool catches an exception but returns it as standard text content, the LLM often interprets this as a valid output to work around. It tweaks its arguments and retries indefinitely. By setting \`isError: true\`, the agent framework can break the loop, signal a hard failure to the LLM, and force a reassessment of the plan rather than an argument-tweaking loop.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T16:07:35.710372+00:00— report_created — created