Dev.to
6/17/2026

My AI agent got dumber mid-session. I measured the context window before blaming MCP.
Short summary
The author's AI coding agent appeared to degrade mid-session and initially blamed MCP (Model Context Protocol) servers. By measuring actual token usage across a session, they discovered conversation history alone consumed ~20% of the context window—far more than connected tools. The practical fix: keep sessions shorter, summarize progress rather than carrying full transcripts forward, and always measure before optimizing.
- •Perceived AI agent degradation traced to conversation history accumulation, not MCP tool definitions
- •Author measured token distribution and discovered history consumed ~20% of context window
- •Solutions: shorter sessions, summary handoffs instead of full transcripts, measure before optimizing
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



