Analysis of network traffic of coding agents revealed redundancy of requests

A researcher analyzed the network activity of Claude Code and Codex CLI, discovering significant amounts of data being transmitted when executing simple commands. When sending a one-word query, the system transmitted 305 KB of data to the server, equivalent to 113,460 tokens.
A detailed breakdown of the traffic showed that 85% of the request volume consisted of descriptions of 137 tools available to the agent. Meanwhile, 107 tools were provided by the MCP server, which was not used in the current session. Another 29 thousand characters were added by a plugin hook, and each request was accompanied by an additional background server request not initiated by the user.
For comparison, a similar query through Codex CLI required the transmission of 29 KB of data, corresponding to 9,817 tokens. Despite the comparable length of the system prompt, the difference in total resource consumption was tenfold.
The study's author developed a proxy script in Python that allows tracking the structure of requests and identifying redundant components. The results show that a single unused MCP server can consume up to 52 thousand tokens per request, directly affecting the use of the context window and model cache.
These indicators highlight the problem of "bloated" system prompts in modern AI agents. Optimizing the composition of connected tools and filtering metadata can significantly reduce the load on the API and speed up the system's response time.



