Replit Agent Switching to an older task mid task

Hey Guys,

I have already reached out to tech support but im waiting for a response. My replit agent is on the highest setting and mid task it will just switch to an older task and try to work on that and then just tell me that all the things are done. leaving the new task not completed. I need to watch it like a hawk because I go back thinking it’s done and I notice it switched again. It’s causing all kinds of errors in my app. It’s like the session plan is doing it. im not sure how to fix it

Best bet here is to start a new chat to clear the previous context and avoid confusion. This is unfortunately the nature of things currently with AI, degradation over long chats.

For how often this happens, and how costly this derailment is, you would think you would be able to be credited for the loss if productivity. Yes this is in development but it should hurt the developers more to ensure these pain points are fixed in a timely manner. There is no reason for users who are working at peak settings should have funds leaking figuratively into the drain. The whole point with replit is to be able to start a task and walk away, but coming to find the tasks which were initiated be completely sideswiped with no direct request and sidelined on its own accord is worrying.

Your agent actually nailed the diagnosis in that last screenshot. It’s not a bug in your app — it’s that .local/session_plan.md sticks around after a session ends. New tasks (and subagents) read that old file, so the agent goes off and finishes the *previous* plan instead of your new one, then reports "all done.

Fix:

1. Open the Shell and run: rm .local/session_plan.md

2. That deletes the stale plan so nothing picks it up.

To stop it coming back:

- At the start of a new task, tell the agent: “Clear .local/session_plan.md before planning, don’t reuse any old plan.”

- Have it delete the file as the last step when a task is done.

That’s it — once the old plan is gone, the task-switching stops.