The 3-Step Reset That Saves Any AI Conversation Going Off the Rails
From the publisher’s feed, collected in the ZeroLabs newsroom.
What to do when the AI starts looping, contradicting itself, or producing garbage after a long session.Something weird happens to AI after a long conversation.Image generated by Author using Leonardo AIIt starts repeating itself. It forgets things you told it an hour ago. It contradicts a decision the two of you made together. It starts giving you responses that are technically correct but somehow miss the point entirely. You ask for a revision and it gives you something almost identical to what it just gave you. You push back and it apologizes, then does it again.You sit there wondering if the tool is broken.It is not broken. It is lost.Understanding why this happens is the first step to fixing it. And fixing it takes three steps that most people have never tried because nobody explains them clearly.Why AI Goes Off the Rails in Long SessionsBefore the fix, the diagnosis. Because once you understand what is actually happening, the solution becomes obvious.Every AI conversation happens inside something called a context window. Think of it as the AI’s working memory. Everything you have typed, everything it has responded with, every file you pasted, every instruction you gave at the start of the session — all of it lives in this window. The model can only “see” what is inside the window at any given moment.Here is the problem: that window has a size limit.Modern models have large context windows. Claude, for example, has a 200,000-token window, which is roughly 150,000 words. That sounds enormous. But a busy working session — where you are writing, revising, asking follow-up questions, pasting documents, going back and forth on decisions — burns through tokens faster than you would think. Each exchange adds to the pile. And as the pile grows, older content starts to fall off the edge.The AI does not tell you when this happens. There is no alert. No warning message. The older instructions you gave, the context you carefully set up at the beginning, the decisions you made early in the session — they quietly disappear from the model’s view. And then the model keeps responding as if nothing happened, because from its perspective, nothing did. It only knows what it can see.This is what researchers call context drift. And a 2026 study found that nearly 65% of enterprise AI failures were attributed to context drift or memory loss during multi-step reasoning — not raw context exhaustion. The window was not even full. The quality just degraded because the context was poorly organized, or too old, or buried under layers of back-and-forth.There is a second problem layered on top of this. Even within a context window that is not yet full, models perform worse on information placed in the middle. Research from Stanford, confirmed by multiple independent tests in 2026, found that every major model shows 10 to 25% accuracy degradation for information sitting in the middle of a long conversation. The beginning and end stay fresh. The middle gets fuzzy. This is called the “lost in the middle” problem, and it is why the AI seems to remember your most recent message perfectly but forgets the constraint you mentioned fifteen exchanges ago.So when your AI session goes sideways, one of three things is happening:The session has grown so long that early instructions have literally left the context window. The model is no longer working from the same brief you started with.The context is still there but buried so deep in the middle of a long conversation that the model is underweighting it, even though it technically has access.The conversation has accumulated so much noise — revisions, corrections, false starts, clarifications — that the model is now trying to satisfy too many conflicting signals and producing average output that splits the difference.All three problems have the same solution: a deliberate, structured reset.Step One: Diagnose Before You ResetMost people’s first instinct when AI goes off the rails is to start sending increasingly emphatic messages. “No, that’s not what I asked for.” “That’s still wrong.” “Try again.” “PLEASE just do what I said.”This does not work. It makes things worse.Every correction you send adds more tokens to the pile. Every clarification buries the original instruction deeper. You are not fixing the context problem. You are compounding it. The model now has to reconcile the original instruction, all the corrections, all the attempts, and all the frustration. Its next output is going to try to average all of that together, which is precisely the kind of mediocre, please-everyone response you are already frustrated by.Before you reset, spend thirty seconds diagnosing which failure mode you are in.If the AI is giving you something in the right direction but keeps missing a specific constraint: the context is probably still intact, but a key instruction is buried. You do not need a full reset. You need to restate the constraint clearly and explicitly at the top of your next message, so it sits at the front of the context window.If the AI has started contradicting things you agreed on earlier, or is producing output that looks like it forgot who the audience is, or what the goal was: early context has probably dropped off. You need a full reset.If the AI is looping, essentially giving you the same output with cosmetic variations no matter how you ask: the conversation has accumulated too much conflicting signal. A fresh session is the only thing that will fix this.The diagnosis determines whether you do a partial reset or a full one.Step Two: The Compression PromptWhether you are doing a partial reset or a full one, this is the most important technique in the article.Before you start a new session, ask the AI to compress everything that matters into a single brief. Do this while you are still in the degraded conversation. Even a struggling AI can summarize itself accurately. This is the one task it will almost always do well at this stage, because summarization uses the full context window rather than trying to generate new ideas from it.Here is the prompt to use, which you can copy and adapt:“Before we continue, I want to do a reset to get us back on track. Please write a structured summary of our conversation that I can use to start a fresh session. Include: (1) the main goal we are working toward, (2) the tone, voice, and style constraints we established, (3) the key decisions we have already made that should not be revisited, (4) the specific things I have corrected or pushed back on — these are things to avoid in future responses, (5) what I need you to do next. Be specific. This summary will be the only context the next session has.”What you get back from this prompt is gold. It is everything important from your conversation, compressed, structured, and ordered by relevance. It is a context block that will fit at the top of a fresh session without burning through thousands of tokens on conversation history.One critical note on timing: do not wait until the conversation has completely derailed to ask for this summary. The best time to run this compression is when you feel the quality starting to slip — not after it has fully gone off the rails. Anthropic’s guidance on this specifically recommends generating a checkpoint summary at around 70% of your context capacity, not at 95%. At 70%, the model still has full visibility of everything important and will write a more accurate summary. At 95%, it is already struggling and the summary will reflect that.If you tend to forget to do this proactively, set a rough rule for yourself: after every 15 to 20 exchanges in a working session, ask for a compression summary regardless of whether quality has dropped. Make it a habit rather than a rescue operation.Step Three: The Clean StartOpen a new chat. Paste the compression summary. Then add one more thing.Tell the AI explicitly that this is a fresh start and that it should only use the summary as its context. Do not add “as we discussed” or reference the old conversation at all. Treat this as the opening message of a new conversation with a new collaborator who has been given a briefing document.The opening message of your fresh session should look something like this:“Here is a briefing for the task we are working on. Please read it carefully before responding. [paste your compression summary]. Do not reference or revisit the decisions listed in the ‘decisions made’ section — those are final. Your first task is: [state exactly what you need next].”There are two things happening here that matter.First, by placing the summary at the very beginning of the new conversation, you are putting the most important context in the position where models are most reliable. Not in the middle of a long thread. Right at the top, where it will receive the most attention and weight.Second, the instruction not to revisit already-made decisions is doing real work. One of the most common ways AI wastes time in long sessions is re-litigating things that were already settled. You decided on a format. You settled on a tone. You agreed to exclude a certain type of content. If you do not close those doors explicitly in the fresh session, the model will sometimes reopen them — particularly if the compression summary mentions them in a way that reads like they are still under consideration. Closing them directly prevents backsliding.The Signals That Tell You a Reset Is ComingThe best version of this whole process is one where you never let things get bad enough to require an emergency fix. Here are the four early warning signs that tell you a reset is about 10 to 15 exchanges away.The AI starts hedging more than usual. Phrases like “it depends,” “this could vary,” or “there are several approaches” appearing more frequently than earlier in the session is a signal that the model is trying to reconcile conflicting instructions and splitting the difference.Responses start getting longer without getting better. When a model is uncertain about which direction to go, it often generates more content rather than sharper content. If responses are suddenly twice as long but not noticeably more useful, the context is getting noisy.The AI ignores a constraint you have already stated twice. Not misunderstands it. Ignores it. This is a strong signal that the instruction has moved deep enough into the middle of the context that the model is underweighting it.You find yourself rewriting the same correction for the third time. Once is clarification. Twice is unfortunate. Three times means the correction is not sticking, which means the context structure is the problem, not the wording of your feedback.Catch any two of these signals together and it is time to run the compression prompt before the next exchange, not after.A Practical Shortcut for Regular WorkIf you use AI for the same types of tasks repeatedly — writing, research, coding, content production — there is a smarter way to handle this than running a fresh reset every time.Build a context template for your recurring task types.This is a short document, usually a few hundred words, that contains everything a new session needs to know to produce the type of output you want from the very first response. It includes your goal, your tone, your constraints, your preferences, the things you always edit out, the format you want, and the specific failure modes you want the model to avoid.You create this once, you keep it in a text file, and you paste it at the start of every new session for that task type. You never need to rebuild context from scratch. The AI starts every session already briefed.This approach directly prevents the core problem that causes AI conversations to degrade: the erosion of early context through accumulated conversation history. If the essential context lives in a file that you paste fresh into every session, it is always at the top of the window, always fully weighted, and always immune to the drift that degrades long sessions.For Claude specifically, this template can also go into a Project’s knowledge base, where it is automatically available at the start of every conversation within that project without requiring a manual paste. This is one of the most underused features in the product for exactly this kind of workflow management.The Mindset Shift Underneath All of ThisThere is a way of thinking about AI conversations that causes all of these problems to happen more often than they need to.Most people treat an AI session like a phone call: you keep it going until you are done, and you expect the quality to stay consistent throughout. If it degrades, something has gone wrong.The more accurate mental model is a whiteboard session with a very sharp but forgetful collaborator. They are excellent at the task in front of them. They struggle to hold the whole history of the session in mind at once. The longer the session runs without a structured pause, the more drift accumulates. The best way to work with them is not to push through that drift, but to periodically consolidate what matters and start a clean pass from the consolidated version.This is not a limitation to work around. It is a working style to adopt. The people who get consistently excellent output from AI are not the ones who have found the magic prompt that prevents degradation. They are the ones who have built a working rhythm that includes compression and reset as a standard step rather than an emergency measure.The three steps are simple. Diagnose which failure mode you are in. Compress everything that matters into a structured brief. Start fresh with that brief at the top.Done at the right time, it takes five minutes. Done well, it will save you hours.The Copy-Paste KitCompression prompt (use this before resetting):“Before we continue, I want to do a reset. Please write a structured summary of our conversation for use in a new session. Include: (1) the main goal, (2) tone and style constraints established, (3) key decisions already made — list these clearly, (4) things I pushed back on or corrected — these are to be avoided going forward, (5) what I need next. Be specific and concrete.”Fresh session opener (use this to start the new chat):“Here is a briefing for our session. Read it fully before responding. [paste summary]. The decisions listed are final — do not revisit them. My first task for you is: [state the next task clearly].”Early checkpoint prompt (use this every 15–20 exchanges as a habit):“Quick checkpoint: summarize the goal we’re working toward, the key decisions made so far, and the main constraints I’ve set. Keep it brief — this is for my own reference.”The third one is the one most people skip. It is also the one that prevents the other two from being necessary.The 3-Step Reset That Saves Any AI Conversation Going Off the Rails was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.