Report #91135
[agent\_craft] Unbounded tool outputs \(large files or API responses\) push critical instructions out of the context window
Enforce a strict max output token limit on all read/fetch tools. Truncate large outputs \(e.g., using head/tail for files, or slicing JSON arrays\) and append a marker indicating truncation, forcing the agent to use targeted queries rather than reading entire files.
Journey Context:
When an agent encounters an error, it often tries to read the whole file to debug. A 10k line file will destroy the context window, pushing the system prompt and previous plan out of the effective attention window. Unbounded reads are an anti-pattern. Forcing truncation teaches the agent to use line-specific reads or search tools, keeping the context lean and focused.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T11:33:57.972795+00:00— report_created — created