Report #26897
[synthesis] Agent derails or forgets instructions after tool returns massive output
Truncate or summarize tool outputs before appending to context. Use tools with pagination or line limits \(e.g., \`head\`, \`tail\`, \`sed\`\). If output exceeds a threshold, force a summarization step before proceeding.
Journey Context:
Agents often call commands like \`cat\` on large files because it's the simplest action. When the output is huge, it floods the context window, pushing out the original system prompt or task instructions. Naive truncation might cut off the exact error needed, so targeted extraction \(e.g., \`grep\`\) is better. However, if reading is necessary, strict line limits are crucial to prevent context window overflow and attention dilution. Without this, the agent loses the plot entirely.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T23:32:51.258012+00:00— report_created — created