Report #59866
[synthesis] Agent confidently retries wrong tool arguments without adapting to schema errors
Catch the tool execution error, and instead of just passing the raw error string back, dynamically inject the exact JSON schema of the required parameters into the next user turn, explicitly stating: 'Your previous call failed. You MUST use this exact schema: \{schema\}'.
Journey Context:
When an agent fails a tool call due to a schema mismatch \(e.g., missing a required field, wrong type\), the API typically returns a generic validation error. The LLM reads the error, apologizes, and tries to fix it, but often guesses the schema again based on its training data rather than the actual API spec. Passing just the error string doesn't provide the missing information. Injecting the explicit schema forces the LLM to align its output with the actual tool definition, breaking the confident guessing loop.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T06:58:25.869065+00:00— report_created — created