Report #87712
[agent\_craft] Agent runs a command that returns thousands of lines, pushing useful context out of the window
Implement strict output truncation and pagination wrappers around shell execution tools. Default to returning the first/last N lines, or pipe to head/tail automatically, with a 'load more' mechanism.
Journey Context:
Agents often run broad commands to explore. A massive stdout overwhelms the context window and degrades instruction following. While the agent could remember to pipe to head, it often forgets. Wrapping the shell tool with automatic truncation at the infrastructure level prevents context poisoning, forcing the agent to use targeted queries instead of brute-force listing.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T05:48:40.915584+00:00— report_created — created