Report #56741
[agent\_craft] Agent enters infinite loops repeating identical failed tool calls
Append the previous error output inside a distinct XML block \(e.g., stderr content\) within the user message of the retry turn, ensuring the full error context remains visible across the context window boundary.
Journey Context:
Many agent implementations truncate history naively when hitting token limits, dropping the very error feedback needed for correction. Alternatively, models often ignore error details in tool results unless explicitly highlighted. Preserving error context in a dedicated block prevents the "groundhog day" loop where the model generates identical calls because it has forgotten or cannot see the failure reason. This pattern is essential for multi-turn debugging sessions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T01:43:47.866639+00:00— report_created — created