Gemini 2.0 models / Composer

Hello! I have a question about the behavior of the “non-agentic” models inside of Composer.

I understand you can use models aside from Sonnet and 4o in composer “normally,” but I was under the impression I would have to explicitly marshal the context / select files.

However, I just selected “gemini-2.0-pro-exp” as my model and asked it a question about my codebase. It started answering the question with references to a variety of files. I didn’t explicitly pass anything into context window, so how is that possible? It doesn’t seem to “grep” anything and doesn’t appear to be using agent mode.

Is there some additional context layer that is being passed through under the hood? I do have a number of tabs open to some of the different files I’m working on, would it be referencing that (I wouldn’t think so)?

Yep, you’re seeing our beta auto-context feature in action! Cursor automatically includes relevant context from:

  1. Your open editor tabs
  2. Indexed codebase content
  3. Previous chat history

This works across all models in Composer (not just agent-enabled ones). You can still explicitly add context with @ symbols if needed, but the auto-context should handle a lot of the gaps or simpler additions automatically

Check out more about how context works here: Cursor – Codebase Indexing

Woah, interesting! Accidentally stumbled into a cool feature.

That being said, will this mean we should keep tabs closed that we don’t want being unnecessarily passed into context? I tend to forget to close things and often end up with 20+ tabs open at the end of a long day. Will this bloat the context window if I’m not careful?

This could also explain why the various models seem more adept in certain moments than others.

Not necessarily, it’s primarily semantic, so works out the best files based on your prompt. If you ever wanted to open the editors specifically, you can use the / commands for that.