Why does Cursor (or Claude Code) forget my project between chats?
Short answer
Cursor and Claude Code do not remember your project between chats. A new chat has its own context window. It sees the message you send, files the agent reads, and instruction files the tool loads from the repo. The previous chat is included only if you attach it or resume it, and a chat that was already summarized does not get those dropped turns back. Write what must survive into a file the tool loads every time, keep a short decision log, and start the next chat with a pack you wrote from the git diff.
Why a new chat starts blank
The model does not keep the last conversation. A new Cursor chat carries user rules, project rules, skills, and a root AGENTS.md if you have one. Past chats stay on disk. Attach one with @ Past Chats, or the agent does not see it.
Claude Code starts blank too. claude --continue reopens the latest session. claude --resume picks an older one. A compacted session comes back as the summary plus later messages, not the turns that summary replaced.
- The window filled and early turns were summarized. Same chat, middle of the task gone.
- You opened a new chat, so the transcript stayed behind.
- The code is visible and the decision is not. Nothing in the files says you dropped passwords unless a commit, a comment, or a note says so.
A bigger window only delays the first case. Codex and Lovable start empty too. Put the memory in a file the tool loads, then a short version in the first message.
Write a context file the tool will load
- Cursor:
AGENTS.mdat the repo root, or an.mdcrule in.cursor/ruleswithalwaysApply: true. A plain.mdfile in that folder is ignored. Other rules load only when Cursor judges them relevant, a matching file is open, or you @-mention them. - Claude Code:
CLAUDE.mdat the root or.claude/CLAUDE.md, read every session. WithAGENTS.mdand noCLAUDE.mdorCLAUDE.local.mdon the path, it readsAGENTS.md. If both exist, it readsCLAUDE.mdand skipsAGENTS.mdunless you import one or load both. - Codex reads
AGENTS.md. One root file is enough if you switch tools. Do not keep a second file that disagrees with it.
Claude Code’s auto memory is not that file. A new session sees the first 200 lines, or 25KB, of notes it chose to save. Put a decision you need followed into CLAUDE.md.
Say what the project is, how to run and test it, which decisions still hold, and which work is unfinished, with the path. No secrets. No .env. Change the file the day a decision changes.
An always-on Cursor rule:
--- description: Decisions that are still in force alwaysApply: true --- Sign-in is a magic link. Do not add a password form. Checkout is unfinished. Finish that page or delete it. Do not add a second checkout.
Keep a decision log
The context file is the rule in force. DECISIONS.md is why, including what you refused:
## Magic links only Settled: 2026-03-02 Sign-in is a magic link. Password login was removed on purpose. Do not add it back.
Write it when you decide. “fix” and “wip” never name the option you rejected. Paste only the decisions that constrain today’s task. The log is what you edit when you change your mind.
Start a fresh chat with a short pack
When the window is full, or the agent repeats a rejected plan, open a new chat. Resume the old one only if that transcript is still worth reading. A compacted transcript already dropped the argument.
Put four short parts in the first message:
- Current state. What works, what is broken, and what you are in the middle of.
- What just changed. A few sentences from
git log, not every filename. - Decisions still in force. The ones that would be expensive to reopen.
- Open threads. Half-built files, TODOs, and copies you do not want duplicated.
Then say: continue from this, do not start a second version of the unfinished work, and do not reopen those decisions. Write the pack from the repo. The chat is what forgot. The commits are what landed.
Read the git diff before you prompt
A fresh chat will invent a next step from whatever files it opens. Look first.
git statusshows what is uncommitted.git diffandgit diff --stagedshow the edits.git log --oneline -20shows what already landed.
Then look for a second copy, such as auth.ts beside auth-new.ts, a TODO with no caller, or a file that was added and never wired up. Name it: “Finish checkout/confirm.tsx or delete it. Do not add another checkout.”
What you still do by hand
A file you never edit, a pack you paste once, and a diff you skip are how the same project gets explained again tomorrow.
When you want the pack written from the repo
You can do all of the above without KeepPlot. Use it when you want the pack maintained from the commits, instead of from a file you have to remember to update.
Connect a GitHub repo. KeepPlot writes the recap, a decision log you can edit, flags for half-built and duplicate work, and a context pack for the next Cursor, Claude Code, Codex, or Lovable chat. It does not write to your repository.
The GitHub App asks only for read access to the repositories you choose. Read repository contents and metadata. It does not request write access. Full file contents and diff patches are used to write the recap and the flags, then discarded. The free plan is one project, the last-day recap, and 8 refreshes a month. Connect a repo, free.
Questions
Why does Cursor forget my project when I start a new chat?
The new chat does not include the old transcript. Rules, skills, and a root AGENTS.md do. Attach a past chat with @ Past Chats when you need it. Decisions that lived only in the old chat are gone unless you wrote them down.
Does Claude Code remember CLAUDE.md between sessions?
It reads CLAUDE.md at every session start. The chat that produced the file does not come along. A stale file is followed as written. Auto memory adds only a slice of notes Claude chose to save, the first 200 lines or 25KB.
If I resume the old chat, does that fix it?
You get the saved transcript back. In Claude Code that is claude --continue or claude --resume. If the session was compacted, you get the summary and later messages, not the dropped turns. Reopening a Cursor chat has the same limit.
Will a bigger context window stop the forgetting?
It delays the summary inside one chat. The next chat is still empty, and the repo still does not record the decision or the half-built file. Those have to live in a file or a pack.
Do I need KeepPlot to do this?
No. The file, the log, the pack, and the diff are enough. KeepPlot writes the recap, the flags, and the pack from the repo. The free plan is one project. Connect a repo, or see pricing.