cd /news/ai-agents/context-rot-why-your-ai-assistant-ge… · home › topics › ai-agents › article
[ARTICLE · art-169972] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Context rot: why your AI assistant gets worse after 200 messages (and a 5-line fix)

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.

by read1 min views7 publishedNov 15, 2026

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.

That's context rot, and it's not your imagination.

Every 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.

Common symptoms:

When you notice the symptoms, stop. Ask the model:

Summarize this conversation in 5 lines: goal, constraints, decisions made, current state, next step.

Check 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.

That's it. You keep everything that matters and drop the noise.

Coding 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.

Disclosure: I work on MadGPT. 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.

── more in #ai-agents 4 stories · sorted by recency
── more on @madgpt 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/context-rot-why-your…] indexed:0 read:1min 2026-11-15 · —