Report #91934
[synthesis] Agent proceeds confidently after tool errors because error messages were truncated mid-message
Pre-process tool responses to detect error keywords, then if truncation is necessary, truncate from the beginning \(not end\) to preserve error signatures like 'Exception' or 'Error', or use fixed-token structured error summaries.
Journey Context:
Standard context truncation removes tokens from the end of the content, but error signatures \(Exception types, error codes\) appear at the end of stack traces. This leaves the middle of the error message \(file paths, logs\) which the agent interprets as a successful partial result. Truncating from the beginning preserves the 'Error: X' signature at the end. Alternative approaches like 'don't truncate' fail due to hard token limits. Summarizing errors with an LLM adds latency and potential information loss, whereas strategic truncation is deterministic.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T12:54:11.886256+00:00— report_created — created