Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
When adding inline context to a prompt using the @ reference moniker, this normally shows an inline “intellisense” popup. This popup lets you find what you are looking for, and explicitly identify that you are indeed adding the correct context. This works for all things, if your type @ while you are writing your prompt, and the @ is at the END of whatever you have been typing.
However, if you decide you need to back up and add more inline context references to prior prompt content you already wrote, typing @ will show the inline popup, which works fine for files, however it does not seem to work for directories. I will usually look for directories explicitly by adding a trailing /. So if I have a directory called api, but also have a file named api.module.ts, and perhaps another called api.utils.ts, and I explicitly want the directory, I’ll type (with the inline popup open) @api/. This will then bring that directory to the top, or very near it, making it easy to select. If I want one of the files, I just start typing the start of the filename, @api.mo, and I’ll be able to easily find and select the file.
However, if this is done with text around both the start and end of the @ symbol, with at least one space before and at least one space after, while the inline popup appears, it will NOT show directories. Even if you ignore the fact that the popup does not show directories, and you type it anyway…directories cannot be added as context and an inline reference this way, period. The only way to add a directory is to select everything after your new @, cut it, add the directory (which will now show up, since there is no text content (other than whitespace) AFTER the @, then paste back in all the following content of your prompt again.
The problem is deeper than this, though, as apparently context references do not copy into the clipboard. So if you had one or more inline context references in the content after your new @ where you were trying to add a directory context reference, once you past that content back in, ALL context references are lost, and you then have a real conundrum on your hands.
Steps to Reproduce
A) Initial prompt:
Its time to start building out our new v2 API. Lets add some utilities to our
api area in @project/. Lets create a new Version decorator
@project/is a real context reference, and added to prompt as legit context
B) Decide to explicitly reference the api/ directory of our @project/:
Its time to start building out our new v2 API. Lets add some utilities to our
@api/ area in @project/. Lets create a new Version decorator
@project/is a real context reference, and added to prompt as legit context@api/is just text, not a context reference, context to @apiapiapiapi/ not added to new prompt
C) Try to actually attach and referen@apiapie @api/ directory:
Its time to start building out our new v2 API. Lets add some utilities to our
@api/
@project/cut to clipboard along with rest of prompt@api/is a real context reference, and added to prompt as legit context
D) Paste back in cut prompt content after @api/:
Its time to start building out our new v2 API. Lets add some utilities to our
@api/ area in . Lets create a new Version decorator
@project/completely dropped from prompt@api/remains real context reference
Expected Behavior
- Backing up in prompt to add additional context, including directories, should always work
- Cutting and pasting prompt content should always paste back FULL content, including context references
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Version: 1.4.5 (Universal)
VSCode Version: 1.99.3
Commit: af58d92614edb1f72bdd756615d131bf8dfa5290
Date: 2025-08-13T02:08:56.371Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.5.0
Does this stop you from using Cursor
No - Cursor works, but with this issue