2 min lesson
Attach one file to a bug prompt
Build one Agent prompt with only relevant context. Check the answer against the attached evidence.
Check your understanding
Complete the walkthrough "Attach one file to a bug prompt".
Outcome: The code uses q.length <= 2, so a two-letter query takes the early return. The citation matches the file.
Attach one file to a bug prompt
Agent chat and @ mentions
5 steps · ~3 min
Decide what to attach → Type @ → Pick the file → Send → Read the grounded answer
Read this walkthrough as text
Attach one file to a bug prompt
Agent chat and @ mentions
SayThe search box returns every item for the two-letter query go. I know the filter lives in searchFilter.ts, so I will attach that file. If I did not know, I would let Agent search.
Type
@searchFilter.tsDoChoose searchFilter.ts from Files & Folders.
SeeThe file is attached to the prompt.
Type
Why does go return every item? It should return matching items. Cite the exact condition and suggest the smallest fix.DoSend the prompt.
SeeAgent reads the attached file and cites the condition that returns every item when the trimmed query has two characters or fewer.
DoOpen the cited condition in searchFilter.ts.
SeeThe code uses q.length <= 2, so a two-letter query takes the early return. The citation matches the file.
Simulated Cursor 3.12 (macOS, light) — beta educational reconstruction, not the real product.