Report #11943
[agent\_craft] Agent gets confused or ignores system instructions after a tool returns extremely verbose output \(e.g., shell errors, massive JSON responses\)
Truncate or summarize tool outputs before injecting them back into the context. Set a strict character limit \(e.g., 2000 chars\) for tool returns, appending a '\[Truncated. Use grep/search to find specific details\]' message if exceeded.
Journey Context:
A common failure mode is a shell command returning 500 lines of logs, pushing the system prompt out of the attention window. The agent then hallucinates or forgets its goal. Aggressive truncation of tool outputs forces the agent to use targeted search commands \(like grep or jq\) rather than relying on brute-force reading, keeping the context clean and focused on the task.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T14:44:15.483949+00:00— report_created — created