Report #78737
[agent\_craft] Agent reads a massive log file or directory listing, flooding the context window and pushing out system instructions
Enforce hard truncation limits on tool outputs before they are injected back into the context, and prefer tools that allow targeted extraction \(e.g., head, tail, grep\) over full file reads.
Journey Context:
A common failure mode is an agent running cat on a 10,000 line log file. This consumes the entire context window, pushing out the original task prompt and causing the agent to forget what it was doing. Agents should be designed to truncate tool outputs aggressively \(e.g., to 2000 tokens\) with a message indicating truncation, prompting the agent to use more specific queries \(like grep\) to find what it needs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T14:45:08.064093+00:00— report_created — created