{"slug": "context-rot-why-your-ai-assistant-gets-worse-after-200-messages-and-a-5-line-fix", "title": "Context rot: why your AI assistant gets worse after 200 messages (and a 5-line fix)", "summary": "A developer working on MadGPT described a lightweight technique for countering \"context rot\" in long AI assistant sessions, where accumulated dead ends and stale file versions degrade model output after roughly 200 messages. The fix: ask the model to summarize the conversation in five lines covering goal, constraints, decisions, current state and next step, verify the summary, then start a fresh chat with that summary and the current file version as the first message. The author notes the approach also helps coding agents that edit many files by producing cleaner handoffs and easier-to-review diffs.", "body_md": "You've seen it. The first hour with an AI assistant is great. By message 200 it suggests a fix you already rejected, forgets the framework you're using, and confidently reintroduces a bug from an hour ago.\n\nThat's context rot, and it's not your imagination.\n\nEvery model has a limited context window. Long chats fill it with everything: dead ends, abandoned approaches, old versions of the same file. Even when it all technically fits, the model has to decide what matters, and old noise competes with the new signal.\n\nCommon symptoms:\n\nWhen you notice the symptoms, stop. Ask the model:\n\nSummarize this conversation in 5 lines: goal, constraints, decisions made, current state, next step.\n\nCheck the summary, fix anything wrong, then start a **new chat** and paste it as the first message. Add the current version of the file you're working on.\n\nThat's it. You keep everything that matters and drop the noise.\n\nCoding agents that edit many files burn through context even faster. A clean handoff summary between big steps keeps them on track and makes their diffs easier to review.\n\n*Disclosure: I work on [MadGPT](https://madgpt.io). Its Coder model and VS Code agent are built for long, multi-file tasks, but the technique above works with any assistant. Drafted with AI assistance, edited by a human.*", "url": "https://wpnews.pro/news/context-rot-why-your-ai-assistant-gets-worse-after-200-messages-and-a-5-line-fix", "canonical_source": "https://dev.to/madgpt/context-rot-why-your-ai-assistant-gets-worse-after-200-messages-and-a-5-line-fix-2i3n", "published_at": "2026-11-15 14:14:59+00:00", "updated_at": "2026-11-15 14:19:22.541684+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "large-language-models", "ai-products"], "entities": ["MadGPT"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/context-rot-why-your-ai-assistant-gets-worse-after-200-messages-and-a-5-line-fix", "markdown": "https://wpnews.pro/news/context-rot-why-your-ai-assistant-gets-worse-after-200-messages-and-a-5-line-fix.md", "text": "https://wpnews.pro/news/context-rot-why-your-ai-assistant-gets-worse-after-200-messages-and-a-5-line-fix.txt", "jsonld": "https://wpnews.pro/news/context-rot-why-your-ai-assistant-gets-worse-after-200-messages-and-a-5-line-fix.jsonld"}}