Show it the files

getting started cursor · Step 3


I used to type a careful paragraph about the 401 and then wonder why Agent invented a middleware.ts we do not have. It was not being creative. I had opened the parent folder that contained three repos, and I had not pasted the response body.

This is step 3. You already installed it and you picked one problem. If you still do not have a sentence, You dont need another tool is the earlier one. Now you have to actually show it the work.

The folder is the context

File > Open Folder is not a formality. Agent searches the workspace you opened. Official first-project help says it searches the codebase automatically, and if you want to point, you type @ plus a file or folder, like @auth.ts or @src/components/.

If you open ~/code because you are lazy, it will search a junk drawer. If you open the frontend and the 401 lives in the API repo sitting next door, it will write you a very confident frontend theory.

I do the dumb version more than I admit. I clone something, I am still in the downloads folder, I ask about login. It finds a README and a stray example. I get mad at the model.

Open the repo you mean. One repo. If you truly need two, Cursor does support multi-root workspaces, their search docs say that, but week one people should not start there. Open the one with the bug.

Mention the files you already suspect

You do not have to play mystery. If you think the handler is src/auth/login.ts, @ it. If you think the CSS is in Hero.module.css, @ that too. Their prompting docs say use @ when you know which files matter, and skip it when you do not, because Agent can search.

I @ more than I skip. It keeps the blast radius small. "Fix login" plus no files is how you get a new auth helper. "Look at @login.ts and @LoginForm.tsx, the 401 is on submit, do not touch session" is a conversation I can review.

You can also @ a folder if the mess is a directory. @src/billing/ is useful when you know the area and not the file. You can @ terminal output if the error is sitting in the terminal. You can paste a screenshot of the red overlay, their prompting page mentions drag-and-drop and Cmd+V for images. I do that when the error is a blob I do not want to retype.

The thing I still forget, and the thing week one mistakes is mostly about, is pasting the error itself. "It 500s" is not an error. The stack is the error. The response body is the error. The one line in Chrome that says Cannot read properties of undefined is the error. Put it in the chat.

Indexing, and why a fresh clone sounds drunk

Cursor reads the project so search and Agent have something to stand on. I do not have a documented "wait until the bar hits 80%" instruction from them, so I will not invent one. What I do have is their troubleshooting page: if Agent does not pick up your files, check .cursorignore, check .gitignore, then reindex from the command palette, then attach the file with @.

That matches what I see. Fresh clone. I ask a question in the first forty seconds. The answer is generic, or it names files from a tutorial it remembers, or it talks about Next auth in a Rails app. I wait. I run Reindex if the tree is big. I ask again with @app/controllers/sessions_controller.rb attached. Suddenly it is in the right building.

A weak first answer on a new clone is often a half-built index. Not always. Sometimes your prompt was vague. Sometimes you opened the wrong folder. But if the repo just landed on disk and the reply feels like it has not walked the tree, give it a minute and try again before you switch models or switch tools.

I also add a .cursorignore early on any repo that is not tiny. Official ignore docs say put it in the root, gitignore syntax. It blocks Agent, Tab, inline edit, and @ mentions from those paths. It does not block the terminal or MCP, they are explicit about that hole, so do not treat it like a vault.

I ignore secrets on purpose. **/.env, **/.env.*, **/credentials.json, **/secrets.json. Their own examples look like that. I also ignore giant junk if it is not already in gitignore, build output, a local data/ dump, the 400mb fixture folder someone committed in 2019.

Cursor already ignores .gitignore matches plus a long default list, node_modules, .venv, lockfiles, images, that kind of thing. So you are adding the stuff that is yours and dangerous, or yours and huge. I learned this after it indexed a customers.csv I should not have had in the repo at all. The answer was very specific. That was the bad kind of specific.

If Agent cannot see a file you know is there, the ignore file is the first place I look. I have ignored tmp/ and then asked it about a script I keep in tmp/fix-dates.js like a raccoon. My fault.

There is a setting for hierarchical ignore, parent folders, under Cursor Settings. Docs say it lived under Features > Editor and in 3.11 it moved to Indexing > Ignore Files. I turn it on at work because we nest stuff. At home I just keep one file in the root.

A prompt I actually send

Open the API repo. Cmd+I. Then something like:

I get a 401 on POST /api/login with the test user sam@example.com. Response body is pasted below. Look at @src/auth/login.ts and @src/auth/passwords.ts. Do not rewrite the session helper. Tell me which check fails and change only that.

Then I wait until it has read those files. If it starts editing a third file I did not name, I stop it. Their Agent help has a Stop button. I use it.

If the first reply is "you should implement JWT," I know it has not seen the repo. I do not argue with the essay. I @ the files again, or I reindex, or I notice I opened ~/projects instead of ~/projects/billing-api.

Context is not a vibe you set in settings. It is the folder, the @ mentions, the error text, and whether the index has caught up. Skip any one of those and you will get a fluent answer about a codebase you do not have.

When it still goes wrong after you showed it the files, that is step 4. You will need the diff and the restore button. If you want this to become a habit instead of a lucky night, step 5.

And if the work is not files, stop forcing Cursor. Claude will take the messy notes. Grok will take the current question. The map is Which tool when. I keep linking that because I still open the wrong app when I am annoyed.