I found this article really helpful in understanding why Agent often fails in certain scenarios—especially the section titled “Context Clash”:
How Contexts Fail and How to Fix Them
“We find that LLMs often make assumptions in early turns and prematurely attempt to generate final solutions, on which they overly rely. In simpler terms, we discover that when LLMs take a wrong turn in a conversation, they get lost and do not recover.”
This matches a pattern I frequently see: when someone tries to get Agent to “fix” something without giving enough context, the Agent often guesses incorrectly. If you then respond with something like “No, that didn’t work—you needed to account for XYZ,” the Agent is actually less likely to get it right on the next attempt. It tends to double down on the initial (wrong) trajectory.
The better approach is to roll back and try again—this time with the added context included from the start.
Including a failed attempt can be useful—but only if the original attempt was made with sufficient context. If it wasn’t, including that failed attempt just biases Agent to repeat the same flawed reasoning.
2 Likes
What a fascinating article, and definitely feels true from my work building Replit apps.
Roll back is one idea, but if I am honest, my experience makes me not trust it to truly roll back everything - I’ve definitely found cases where it hasn’t.
Hence my golden rule that the moment I notice Agent take a wrong turn or repeat old mistakes, dump it and start a new chat. But tell me @kody-replit, when we do that, does the new chat really start afresh without the broken bits of the context from the previous chat? It seems to, but I would love to hear a Replit insider’s view.
We’ve been experimenting with memories from previous chats but for the most part it’s a fresh context. Where has rollback been failing for you?
1 Like
I “think” it failed to restore all the previous files. But honestly can’t be sure. At the moment we are rolling back, we are usually a bit frustrated that Agent isn’t behaving, so rational observation of what is happening goes out of the window! So I always prefer to just start a new chat and push on with fixing whatever hole I’ve dug.
Always forward, never back.
Such fun!! 
What I’ve found really helpful is to copy the whole chat and paste it into Gemini 2.5, it immediately sees the issue and creates a prompt for the fix…most times, I did go down a rabit hole that way also one time.
1 Like
I’m kind of worried that starting a new chat wont continue the app if its already deployed.
What do you think?
1 Like
The deployment is completely independent of the workspace environment (minus the database which is shared for now).
Starting a new chat just clears context on the chat in the workspace.
1 Like
Is my replitt upgraded? The cost now is ridiculous. Is there a settings i was supposed to do? I’ve already spent 3x of my previous month even though its just the beginning of the month. Can i downgrade? How?