AI Context Jump: API Development to Discord Bot

:white_check_mark: Check the forum : I have checked the forum but could not find a report matching this specific context jump scenario.

:lady_beetle: Clear description of the bug :
The AI assistant unexpectedly and abruptly lost the context of our ongoing conversation about building a REST API for a content management system. It suddenly switched to discussing a completely unrelated project: building a Discord bot to display Clash Royale statistics. The discrepancy in topics is very high and irrelevant to the project I was actively working on.

:counterclockwise_arrows_button: Explain how to reproduce the bug (if known) :
It’s difficult to provide exact reproduction steps as it seemed to occur mid-conversation flow.

  1. Start a new chat or continue a conversation where you are working on a specific technical task (in this case, building a REST API using a framework like Elysia).

  2. Engage the AI in several turns of conversation, discussing implementation details (e.g., authentication, route creation, data handling).

  3. After a certain point (as shown in the attached screenshot), the AI’s response suddenly shifts context entirely, introducing a new, unrelated project topic (Discord bots, Clash Royale).

:camera: Attach screenshots or recordings :
Screenshot is attached showing the transition point from discussing the API code to introducing the Discord bot project.

:laptop: Operating system and your Cursor version :
Operating System: Ubuntu 24.04.2 LTS
Cursor Version: 0.48.6 (1649e229afdef8fd1d18ea173f063563f1e722e0 x64)

:prohibited: Does the issue stop you from using Cursor? :
Yes, it stops me from effectively using the AI assistant for the task I was currently working on. Once the context is lost and jumps to an unrelated topic, the AI’s responses are no longer helpful for my original goal, requiring me to discard the current AI thread or try to force it back to the correct topic, which is inefficient.

It seems like the issue is caused by the LLM losing focus due to an overly large context. To save tokens, Cursor or the LLM provider might summarize or truncate previous messages, which can sometimes result in the model forgetting the original intent and jumping to an unrelated topic.

If you’re interested, you can check out my open-source project: Shrimp Task Manager. It’s a based on the Model Context Protocol (MCP), designed to help AI assistants maintain task continuity and context, reducing issues like unexpected topic shifts.

One of its key features is: when the AI loses focus due to context truncation, you can simply open a new chat and ask the assistant to “continue the previous task.” Shrimp MCP will automatically activate behind the scenes, guide the assistant to resume the task, and provide context to help it pick up where it left off—no manual setup required.

1 Like