Cursor·Fixpromptingbeginner

Cursor Says Context Limit Reached

Quick Answer

The conversation has too many messages. Each message uses tokens, and there's a maximum context window size. Start with "Start a new chat" before making broader code changes.

You're in the right place if...

  • !'Context window is getting long' warning
  • !Responses become vague or repetitive
  • !Cursor forgets earlier instructions

Why this happens

The conversation has too many messages. Each message uses tokens, and there's a maximum context window size.

Fix

1

Start a new chat

Click the + button to start a new conversation. Before doing so, ask Cursor to summarize the current state.

2

Re-add relevant files

In the new chat, use @file to add only the files relevant to your current task. Don't add the entire codebase.

3

Use @codebase sparingly

@codebase is powerful but uses many tokens. Use @file for specific files instead.

Prevent this next time

One conversation per feature. Don't let a single chat span authentication, database, AND frontend styling.

Frequently Asked Questions

Typically 30-60 messages. Long code blocks fill the context faster.

No. Only the chat history resets. Your code files are unchanged.

Related fixes

Weekly Newsletter

Get next week's fix before you need it.

Join developers getting weekly vibe coding tips, error fixes, and tool updates.

Subscribe on Substack →