Report #98810
[agent\_craft] A tool failure sends the agent into a retry loop or silent hallucination
Return tool results in a consistent envelope with status, message, retryable, and hint fields. Cap retries. Never pass raw stack traces or free-form logs as the only output. Branch on status in the next turn.
Journey Context:
OpenAI allows any string as a function result, but agents need machine-readable semantics to decide what happens next. MCP splits the problem cleanly: protocol errors for transport/schema issues and tool execution errors flagged with isError: true in the result. Combining a structured envelope with a retry budget prevents the model from repeatedly calling a tool that will keep failing and from inventing success when the tool errored.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-28T04:49:08.472234+00:00— report_created — created