Report #76803
[agent\_craft] Agent loads massive tool execution outputs \(like ls -R or huge log files\) directly into context, crowding out useful instructions
Enforce strict truncation and summarization on tool outputs before returning them to the LLM context. Cap tool returns at a fixed token limit \(e.g., 2000 tokens\) and append '... \[truncated, use grep/read to see more\]'.
Journey Context:
LLMs have finite context windows. A single unbounded tool output \(like reading a 10,000 line log file\) can consume the entire window, pushing out the system prompt and previous reasoning. Agents must defensively truncate tool outputs. If the agent needs more, it should use targeted tools \(like grep or tail\) to narrow down the data outside the context window.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T11:30:09.709593+00:00— report_created — created