I measured what was actually in my agent's context: 84% of the command output was noise nobody reads

Reddit r/AI_Agents News

Summary

The author measured that 84% of command output in coding agents is unnecessary noise, and shares key principles for filtering it effectively to improve efficiency, such as filtering at execution time and ensuring accurate attribution.

I spent a week looking at what my coding agents actually put in their context, and the answer was embarrassing: most of it was command output that no human or model needed. One example from my own repo. cargo test writes 188,298 bytes to stdout: 2,553 lines, about 47k tokens. Of that, the useful part is three failing tests with file:line, the assertion, the totals and the exit status: 669 bytes. Everything else is 2,503 passing test names, panic traces printed twice, backtrace hints and build chatter. Same shape for git diff on a wide branch and for grep across a tree. What I built to fix it, and more importantly what I learned: Filter at execution time, not after. Once 188 KB is in the transcript, the cost is already paid. The decision has to happen where the command runs. Bounded output has to name what it dropped and keep exact recovery available. A silently truncated payload is worse than a long one, because the model cannot tell the difference between "finished" and "cut off". Attribution matters more than compression. In a typical stack a command wrapper trims output, a search tool builds its own index, a memory tool runs its own process, and all three report a different idea of what was saved. Until one component owns the ledger, savings numbers are vibes. Agents route around friction. If the raw command is easier to reach than the efficient one, the agent takes the raw one. So the efficient path has to require less judgment than the bypass, and a bypass has to earn zero credit instead of quietly counting as a win. Never fake a zero. If the ledger is unavailable, it should read unknown. A comfortable zero teaches you to trust a number that is not there. Measured across 14 identical cases with 5 repetitions and pinned versions: 284,996 tokens of delivered command output raw, 44,400 through the control plane. 84% less, with the recorded run and checksums kept alongside the code. Token counts are byte-derived estimates of delivered output, not provider billing. Happy to answer implementation questions. Links in a comment, per rule 3.
Original Article

Similar Articles

Tested whether my coding CLI actually reads AGENTS.md.

Reddit r/AI_Agents

An experiment testing whether a coding CLI actually reads AGENTS.md found the file was silently ignored, and even when read, bloated instruction files increased token costs and failed to improve performance. The author recommends writing only what the model cannot infer from code.

@yibie: Recommends this hardcore real-world test. An engineer tracked his coding agent session for a week and found that only 0.67% of tokens were spent on actual tasks—the remaining 99% all went to moving tool directories, skill descriptions, and system prompts. Work-to-overhead ratio 1:1…

X AI KOLs Timeline

An engineer tracked his coding agent's token usage over a week, finding that only 0.67% of tokens were spent on actual tasks, with 99% consumed by tool directories, skill descriptions, and system prompts. He provides optimization strategies, including shell output filtering which saved 46.9% of tokens.