Is there a better way to add files/folders to context?

When working in a larger projects or multi-root projects I often have the issue where I’d like to add something fairly nested. Unfortunately using @filename doesn’t always work because some things (Nextjs) have similar filenames with only a different folder structure. There’s no way to really easily browse for a specific folder using the @ command that I’ve found…

If I could tab complete without adding things to the context this would solve the problem, but I’m unaware of an additional hotkey to do this.

Hey, thanks for the request. A few practical tips for this case:

  • In the @ request, type a longer path fragment, not just the file name. For example @app/dashboard/route or @dashboard route. Fuzzy match will rank the right file higher, and it helps separate Next.js duplicates. In the dropdown you usually see the parent folder next to the name, so identical names are easy to tell apart before you attach anything.
  • After you pick a folder, you can type / to go deeper into the subfolder tree.
  • For browsing, the easiest option is drag and drop a file or folder from Explorer straight into the chat input. It creates the same kind of link as @. There’s also a right click option Add File to Cursor Chat in Explorer, but it’s not stable in all modes, so drag and drop is more reliable.

A couple important details so there are no surprises:

  • The @ picker works like a flat fuzzy search, not a hierarchical path browser. So @app/ will not show the app folder first with its contents under it. That’s why the longer path fragment tip helps.
  • Behavior is a bit different between the IDE sidebar chat Cmd+I and the Agent window. In the sidebar you get full fuzzy match with abbreviations. In the Agent window it’s more reliable to type an exact part of the name or path. If @ is acting up in the Agent window, the sidebar chat is usually easier for quick @ links.

Docs: @ mentions and context | Cursor Docs

About your request for tab complete without adding to context, there isn’t a separate hotkey right now. Tab commits the mention right away. This would be a good feature request. If you post it as a separate thread in Feature Requests, it’ll reach the team and can collect votes. A similar request about easier folder navigation is here: Folder path browsing when selecting context. Feel free to add your case there too. Let me know if any of the tips above don’t work.

There appears to be a 50-character limit on the fuzzy search which was throwing me off on some of the more nested path names. This seems like a sane limit for a fuzzy search, just was not expecting the search to die when typing out the full file name from the chat root.

Understanding this now it’s a bit easier to work around as I can omit the earlier parts of the path

Good catch, thanks for coming back and sharing the details. Yeah, the fuzzy search in the @ picker has a request length limit, and when you type the full path from the root, it can go over that limit. That’s why it feels like the search “dies”. Your approach is right, drop the beginning of the path and keep the most distinctive part like dashboard/route instead of the full root path so the match ranks correctly.

I agree that a search silently stopping on long input is confusing, I’ll pass this to the team as UX feedback. If you hit any more quirks with @ mentions in large projects, post in the thread.

This is interesting because it highlights a broader context problem: with large codebases, developers still have to figure out which files or folders the AI needs to see. Better path search helps with selection, but the harder problem is determining the relevant context in the first place. We’ve been exploring this with repository-level reasoning and MCP so the agent can discover relevant files and dependencies instead of relying entirely on manual context selection.

Good point. It helps to separate two mechanisms.

@-mentions are a manual way to pin context, and the tips above are about making that less painful in big projects. But the agent doesn’t rely only on what you attach manually. It has its own tools to search the codebase like semantic search, grep, reading files, and following dependencies, and it pulls in relevant files on its own as it works through the task. More on these tools: Search | Cursor Docs

For more repository-level scenarios and custom context sources, MCP is a good fit. You can connect your own servers that the agent can use for discovery: Model Context Protocol (MCP) | Cursor Docs

If you have a specific idea of how this should work, like automatically selecting relevant files and dependencies based on the task, it’s best to make a separate thread in Feature Requests. That makes it easier to gather votes and get it in front of the team.