Report #28631
[frontier] Return full tool output to the LLM so it has complete information to reason with
Design every tool with an output schema that returns only the fields needed for the agent's next decision. Truncate, filter, or summarize before the result enters the context window.
Journey Context:
The most common production failure: a tool returns a 500-line file listing or a massive JSON blob, and the agent's context window fills in 2-3 turns. The naive assumption is that more information helps the LLM reason better. In reality, LLMs suffer from the 'lost in the middle' effect — they attend poorly to information buried in large undifferentiated blocks. A file search returning 50 results should return the top 5 with relevance scores. A file read should return only the relevant function signature and body, not the entire module. A shell command returning verbose output should be filtered to stderr on failure or the last 20 lines of stdout on success. This is a tool design discipline: each tool's output schema should be as minimal as its input schema is specific. The agent should never need to parse through noise to find signal. If you find yourself writing 'extract the relevant part from this output' in a prompt, the tool is returning too much.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T02:27:19.309044+00:00— report_created — created