<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Shreem Seth on Medium]]></title>
        <description><![CDATA[Stories by Shreem Seth on Medium]]></description>
        <link>https://medium.com/@shreemseth26?source=rss-688b022f0c5d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*6z5mlCwZOAimkMgD</url>
            <title>Stories by Shreem Seth on Medium</title>
            <link>https://medium.com/@shreemseth26?source=rss-688b022f0c5d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 06:09:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shreemseth26/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Context Rot : How an agent slowly forgets what it was doing]]></title>
            <link>https://medium.com/@shreemseth26/context-rot-how-an-agent-slowly-forgets-what-it-was-doing-9b05954eedd3?source=rss-688b022f0c5d------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b05954eedd3</guid>
            <category><![CDATA[ai-component]]></category>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[agent-registry]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Shreem Seth]]></dc:creator>
            <pubDate>Sun, 06 Sep 2026 13:57:03 GMT</pubDate>
            <atom:updated>2026-09-06T13:57:03.313Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*o-GwEH8e4e_Zb8_f.jpg" /></figure><p>Imagine you were asked to study 5 subjects together. Or given the instructions to perform multiple chores at once. It’s likely that you’ll be overwhelmed by all this information thrown at you and end up doing all five things poorly rather than one thing well. That is exactly what happens to AI agents too, and the ‘information’ AI agents work with is referred to as context.</p><p>Context is the information that your AI agent uses to understand, plan and execute a task to generate an accurate output. This could include the user query, system prompt, chat history, any relevant documents, outputs from tool calls, api calls and other agents, etc.</p><p>While modern LLMs provide large context windows — with some frontier models supporting up to 1 million tokens (about 750,000 words) — more context and more information does not necessarily imply better performance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hR9x7AUpbnR3C1iU00NVwg.png" /></figure><p><em>Then what does?</em></p><h3>The core qualities of good context are :</h3><ul><li><strong>Relevance </strong>: Every piece of information to the model must be required for the task at hand.</li><li><strong>Accuracy </strong>: The information must be true and from a verified source so that the model isn’t reasoning from bad data.</li><li><strong>Structure </strong>: Organised information with labels and order is easier to process and helps the model distinguish between different information types.</li><li><strong>Compression </strong>: Cut out the fluff and only give the essential data.</li><li><strong>Timing </strong>: Context should be introduced only when needed. For example, instead of giving someone the whole recipe at once, it is divided into executable steps.</li></ul><p>These qualities are easy to maintain in short conversations, but agentic workflows are rarely short. They run in loops and accumulate context over time. When relevance breaks down, the model can’t tell what matters, when the timing breaks down, everything is front-loaded instead of introduced when needed. As the context window fills up, an LLM’s reasoning accuracy and task execution efficiency gradually degrade, producing less reliable output. This is called context rot.</p><h3>Warning signs of context rot in your AI agents :</h3><ul><li>The agent generates responses that contradict statements made earlier in the session</li><li>Agreeing with the user without reasoning properly, even when the user is wrong</li><li>Task performance degrades the longer the session runs</li><li>Information placed in the middle of a long context are buried as compared to ones places at the start or end.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v8kIWL12U7UE49kpv-GIcA.png" /><figcaption>Needle in a haystack problem</figcaption></figure><ul><li>Hallucinating data that was never provided</li><li>Loses track of what it has already tried and keeps looping the same failed action</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5ojlilWK6GFg6Cecqk3NBQ.png" /></figure><p>Context rot isn’t inevitable, it is a symptom of poor context management and it can be mitigated by applying strategies at each stage of an agent’s workflow. What we are essentially trying to do with these strategies is to actively protect the qualities of good context we’d seen earlier in this article, even as the session becomes large.</p><h3>Mitigation Techniques :</h3><ul><li><strong>Summarization </strong>: Periodically compress the conversation into a summary and restart the session with that summary as the new starting context, instead of carrying the raw turns forward. This can either be done in a periodic manner, triggering context handoff every X number of tokens, or you can trigger it manually when you notice any of the context rot symptoms.</li><li><strong>Task Decomposition using sub-agents</strong> : Instead of having one agent carry out a long set of tasks, split the work across multiple agents. Each one of these sub-agents will have their own context window, pertaining to their specific sub task. Then hand off the final result to the main agent.</li><li><strong>RAG </strong>(Retrieval Augmented Generation) : Store relevant documents externally instead of cramming them into the context at the start and retrieve only what is needed for the current step.</li><li><strong>Pruning : </strong>Actively remove resolved information from the context as the conversation progresses.</li><li><strong>Re-anchoring</strong>: Periodically restate key instructions and constraints.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lpnX0MClo3oMypRGrIZY-g.png" /></figure><p>Knowing these techniques exist is one thing, knowing when to apply them is another. Summarizing too early wastes effort; summarizing too late means the damage is already done. To catch context rot before it tanks task performance, you need visibility into what’s actually happening inside an agent’s session as it runs — which is where observability tools come in.</p><p>There are a lot of observability tools that you could use, that help trace tool calls and score sessions across agents, so that instead of guessing when and why an agent’s quality dropped, you can look at the trace itself and understand at what point things in the session started going sideways.</p><p>Recently, I tried out <a href="https://github.com/Observal/Observal">Observal</a>. It is a registry for AI coding agents — you can use it to package, version and share agents and agentic components. Observability is built into that registry — sessions are traced automatically, and an insights engine analyses usage patterns to report what’s working and what isn’t across an agent’s workflows. The platform has been quite useful for recognizing patterns consistent with context rot.</p><p>So the next time your agent is giving you vague answers, don’t quickly assume that the model is incapable or that you need a better prompt. It’s likely that the problem lies with your context instead.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b05954eedd3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>