Course · Cursor · Context · @-tag & self-gathering
Context: @-tagging and self-gathering
Context - in this course’s sense, the information in front of the agent when it decides - is the chapter’s whole subject: an agent is only ever as good as what it’s looking at. Give Cursor the wrong three files and the right model will still write a confident, wrong patch - because from inside the window, the wrong files are the codebase. So before any chapter about prompting or models pays off, you need the one underneath it: steering what the agent sees. That’s two skills braided together. One is pointing - pulling the exact file, folder, terminal, or diff into the window with the @ menu, or steering documentation by pasting a link straight into the prompt. The other is knowing when not to point - letting the agent gather its own context, and recognizing the cases where that auto-retrieval quietly picks the wrong material and you have to take the wheel back.
This chapter runs on the course’s illustrative scenario: budgetcli, an inherited personal-finance API - a TypeScript monorepo with an API surface, a worker that fetches and parses incoming transaction feeds, and shared utilities. It’s big enough that “just let the agent figure it out” sometimes works and sometimes lands you in the wrong package entirely, which is exactly the tension this chapter is about.
What Cursor already knows
Section titled “What Cursor already knows”Before you tag anything, understand what Cursor already knows about your code. The answer, as of September 2026, is a search engine Cursor ships with called Instant Grep - “a custom search engine that outperforms ripgrep on large codebases”, in the docs’ words, one that “runs automatically; no configuration needed” (search docs). Two properties of it matter for everything else in this chapter:
- The index lives on your machine. The docs state it flatly: “Instant Grep builds and queries its index on your machine. Cursor does not upload file paths or code to build a search index, and it does not store embeddings of your codebase for search.” One boundary to keep in view: when the agent opens a match, that file’s content can still be included in the model request, exactly as when you attach a file yourself - Cursor’s data-use page describes how request data is handled. (source)
- “Find it by meaning” is the agent’s job now, not the index’s. Instant Grep matches exact things: “a function name, variable, error string, or regex pattern”, and “Agent uses grep automatically when you reference specific symbols.” But you rarely prompt in function names - you write find where transaction dates get normalized, and it is the agent that translates that description into concrete symbol and regex searches over the local index. For broad sweeps it can spawn an Explore subagent, which runs many parallel searches in its own context window and returns only the relevant findings, keeping your main conversation uncluttered. (source)
You don’t operate any of this day to day - “no configuration needed” is literal. It’s the substrate under self-gathering: when the agent goes looking for the code behind a symptom, these are the searches it runs, against an index that never left your machine.
The moves of this chapter
Section titled “The moves of this chapter”- Pointing - the current
@-menu inventory (files and folders, terminals, chats, diffs, the browser, and manual rules - rules you pull in by hand with an @ mention rather than any automatic loading) and the worked fix where a hand-pinned file plus a pasted docs link beat a search - Pointing with @: the attach menu - Not pointing - agentic retrieval finds files your mental map of the repo would have missed, which on inherited code is usually the better move - Self-gathering and hand-pinning
- Taking the wheel back - the two cases where retrieval reliably guesses wrong, plus the chat-as-session habit that keeps each window sharp - When hand-pinning still wins
Read the search engine once, so you know what happens on your machine; you’ll rarely touch it again. Pointing then gives you the precise instrument for the moment you know exactly which file matters, and self-gathering takes it away again - on a repo you inherited, your map of the layout is the weakest part of the loop, and the agent’s search is not limited by it. What’s left, and where the skill actually lives, is naming the cases where a wrong guess is expensive, and spending two seconds to remove the guess.