# Context and Agent Failures

**URL:** <https://replit.discourse.group/t/context-and-agent-failures/5741>\
**Category:** Agent & Assistant\
**Tags:** agent\
**Created:** [June 29, 2025, 11:03pm UTC](https://replit.discourse.group/t/context-and-agent-failures/5741 "2025-06-29T23:03:14Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![kody-replit](https://yyz2.discourse-cdn.com/flex010/user_avatar/replit.discourse.group/kody-replit/32/3_2.png) [@kody-replit](https://replit.discourse.group/u/kody-replit)\
**Post date:** [June 29, 2025, 11:03pm UTC](https://replit.discourse.group/t/context-and-agent-failures/5741/1 "2025-06-29T23:03:14Z")

</div>

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](https://www.dbreunig.com/2025/06/22/how-contexts-fail-and-how-to-fix-them.html)

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

---

<div class="post-metadata">

**Author:** ![Gipity-Steve](https://yyz2.discourse-cdn.com/flex010/user_avatar/replit.discourse.group/gipity-steve/32/1431_2.png) [@Gipity-Steve](https://replit.discourse.group/u/Gipity-Steve)\
**Post date:** [June 30, 2025, 7:46am UTC](https://replit.discourse.group/t/context-and-agent-failures/5741/2 "2025-06-30T07:46:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kody-replit](https://yyz2.discourse-cdn.com/flex010/user_avatar/replit.discourse.group/kody-replit/32/3_2.png) [@kody-replit](https://replit.discourse.group/u/kody-replit)\
**Post date:** [June 30, 2025, 6:26pm UTC](https://replit.discourse.group/t/context-and-agent-failures/5741/3 "2025-06-30T18:26:40Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Gipity-Steve](https://yyz2.discourse-cdn.com/flex010/user_avatar/replit.discourse.group/gipity-steve/32/1431_2.png) [@Gipity-Steve](https://replit.discourse.group/u/Gipity-Steve)\
**Post date:** [June 30, 2025, 8:32pm UTC](https://replit.discourse.group/t/context-and-agent-failures/5741/4 "2025-06-30T20:32:11Z")

</div>

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!! 😊

---

<div class="post-metadata">

**Author:** ![realfunnyeric](https://yyz2.discourse-cdn.com/flex010/user_avatar/replit.discourse.group/realfunnyeric/32/2150_2.png) [@realfunnyeric](https://replit.discourse.group/u/realfunnyeric)\
**Post date:** [July 1, 2025, 8:51pm UTC](https://replit.discourse.group/t/context-and-agent-failures/5741/5 "2025-07-01T20:51:45Z")

</div>

This definitely tracks.

---

<div class="post-metadata">

**Author:** ![nontraditionalr](https://avatars.discourse-cdn.com/v4/letter/n/74df32/32.png) [@nontraditionalr](https://replit.discourse.group/u/nontraditionalr)\
**Post date:** [July 5, 2025, 3:43am UTC](https://replit.discourse.group/t/context-and-agent-failures/5741/6 "2025-07-05T03:43:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![highbornincglob](https://avatars.discourse-cdn.com/v4/letter/h/977dab/32.png) [@highbornincglob](https://replit.discourse.group/u/highbornincglob)\
**Post date:** [July 6, 2025, 2:32am UTC](https://replit.discourse.group/t/context-and-agent-failures/5741/7 "2025-07-06T02:32:43Z")

</div>

I’m kind of worried that starting a new chat wont continue the app if its already deployed.

What do you think?

---

<div class="post-metadata">

**Author:** ![kody-replit](https://yyz2.discourse-cdn.com/flex010/user_avatar/replit.discourse.group/kody-replit/32/3_2.png) [@kody-replit](https://replit.discourse.group/u/kody-replit)\
**Post date:** [July 7, 2025, 2:48am UTC](https://replit.discourse.group/t/context-and-agent-failures/5741/8 "2025-07-07T02:48:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![highbornincglob](https://avatars.discourse-cdn.com/v4/letter/h/977dab/32.png) [@highbornincglob](https://replit.discourse.group/u/highbornincglob)\
**Post date:** [July 14, 2025, 3:57am UTC](https://replit.discourse.group/t/context-and-agent-failures/5741/9 "2025-07-14T03:57:36Z")

</div>

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?
