Report #48796
[synthesis] Agent loops infinitely because tool response truncation hides the actual error message
Implement smart truncation that preserves the head and tail of tool outputs, or use a 'search within output' tool pattern where the agent must query the output rather than reading it entirely into context.
Journey Context:
Standard truncation \(e.g., taking the first N characters\) is disastrous for logs and stack traces, where the most critical information \(the error\) is usually at the end. The agent sees the beginning of the output \(e.g., 'Building...'\), assumes it's fine or doesn't see the error, and repeats the failing command. The synthesis here is combining the limitations of context windows with the structure of standard tool outputs. Without tail-biased truncation or grep-like tools, the agent is blind to its own failure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T12:23:12.485081+00:00— report_created — created