Fix
Why Cursor 'Forgets' Context Mid-Task (and How to Drive It)
Cursor 'forgets' because every model has a finite context window. A long chat fills it with stale tokens that crowd out what matters. The fix is context hygiene: start a fresh chat for each task, give Agent only the files it needs and restate constraints near the end of long sessions.
On this page
Why does Cursor forget what I told it?
Models read a fixed-size context window. As a chat grows, older instructions get pushed toward the edges where the model weights them less or drops them. It looks like forgetting. It is really a full, noisy context.
There is a name for the worse version of this: context rotThe quality drop that happens when one chat accumulates unrelated tasks or tangents, burying the signal the model needs in a haystack of stale context. Press Enter for the full definition.. When you finish one task and start an unrelated one in the same chat, or wander off on a tangent and come back, the window fills with topics the model now has to sort through. That creates a needle-in-a-haystack problem. The model can no longer tell what you are actually trying to accomplish, and the quality of the code it generates drops.
You don't have to hit the hard limit to feel this. A Cursor field engineer's rule of thumb: past roughly 50-60% of the window, depending on the model, you can already see a slight drop in how well it performs.
Research has shown that if you fill up the context window, the model tends to degrade. Doesn't matter how great the model is.
Managing context is part of using coding agents well. Teams that practise it get fewer repeat mistakes and cleaner changes.
A Cursor field engineer's rule of thumb is to start a new agent for every new task. Continuing the same task in one session is fine. A genuinely new task gets its own session so the context stays isolated and you don't invite scope creep.
General best practices for prompting is be specific, be precise and stay isolated. You want to make sure that each agent is working on its own thing and there's no scope creep there.
This is covered hands-on in Troubleshooting and Operating Cursor Reliably — 7 short modules, free to read.
How do I fix it?
These are the habits to run on every task; do them in order. Each one keeps the window holding only what the model needs right now.
- 1Start a fresh chat per task. Don't reuse one endless thread across unrelated work.
- 2Scope context tightly. @-mention only the files in play; close irrelevant tabs.
- 3Restate the constraint when a session gets long ("remember: don't change the public API").
- 4Reset at ~70% context. When a thread feels heavy, run
/summarizeto condense the window, or start fresh. - 5Use rules for durable conventions so you're not re-explaining them every chat.
You don't have to lose accumulated work when you start clean. In a new chat, @past chats pulls a compressed version of an earlier conversation, dropping completed tool calls so only the gist comes across. Forking a chat does the same in one step, branching a fresh thread off the prior context.
Both let you keep building after you've crossed ~80% usage, without dragging every stale token along.
And for tangents (the quick question you would otherwise bolt onto the main thread), open a side chat with /side or by selecting code and choosing Ask in Side Chat. The child conversation inherits the parent's history as hidden reference context, while the main thread stays clean and keeps working.
Why does Cursor keep making the same mistake?
Two causes: the correction never made it into durable context because it lived in an old message. Or there is no verification step, so the agent cannot tell it failed. Put the rule in a .cursor/rules file and give the agent a test or command it can use to check itself.
The stronger argument for a rule file, I think, is positional rather than about persistence. Cursor's rules docs say applied rule contents are included at the start of the model context, so the instruction arrives in the same place on every turn rather than wherever in the thread you happened to say it.
That only holds while the rule loads. A rule scoped to the wrong files fails silently, and a long enough chat can overwrite a correct one. Our rules fix covers both.
Frequently asked questions
What is Cursor's context limit?
It depends on the model you select, but most default to roughly a 200k-token window, and Max Mode raises supported models to their maximum (up to 1M tokens). Rather than chasing the largest window, keep context clean: the quality of what you include matters more than the quantity.
Should I start a new chat or keep one going?
Start a new chat per distinct task. Long-running threads accumulate stale context that degrades results; a fresh, tightly-scoped chat almost always performs better. Cursor's own usage data has someone who kept the same agent running for a couple hundred days. Do not do that. Stale, unrelated context throws the model off its tracks.
Do rules survive across chats?
Yes. .cursor/rules/*.mdc files are loaded automatically, so conventions persist across chats and teammates. They are the right home for anything you would otherwise repeat.
Sources & last verified
Cursor ships frequently. Last updated July 28, 2026.