1 / 6+33
Scope

Specify a line range

Select the relevant range instead of attaching the entire file: make a selection in Cursor and press Cmd+L, or use @file.ts#L120-160. Every line the model reads counts toward your input; if the bug is in a 30-line function, the other 1,170 lines are pure waste.

context ▼▼▼accuracy ▼▼
Scope

Reference it—don't paste it

When you paste terminal output or code into chat, it becomes part of the conversation and is resent on every later turn. An @file reference lets the agent read it only when needed and leaves just a small trace in the history afterward.

context ▼▼accuracy ▲
Scope

Search first, then read

Instead of asking the agent to wander through directories to find a function, have it locate the target with grep or glob. Search results cost a few hundred tokens; exploring a folder can cost thousands. If you already know the location, provide the exact path.

context ▼▼▼accuracy ▲
Scope

Cut noise with .cursorignore

Add directories such as dist, coverage, .next, fixtures, and generated client code to .cursorignore or .cursorindexingignore. Otherwise, semantic search may surface them as candidates and fill the context with irrelevant snippets.

context ▼▼accuracy ▲
Scope

Exclude lockfiles and build output

Lockfiles, minified bundles, snapshots, and generated migrations consume many tokens while carrying little useful information. Leave them out entirely; when necessary, show only the relevant package entry.

context ▼▼
Scope

Use the exact path

Semantic search can return several file fragments on every call. If you know where the file is, say src/lib/auth/session.ts directly. It is both cheaper and more precise.

context ▼▼accuracy ▲
Scope

Filter the log first

Use head, tail, grep, or jq to isolate the error block, then provide only that section. Dropping a 5 MB file into chat with “inspect this log” can burn tens of thousands of tokens in a single turn.

Filtering the log delivers both huge savings and higher accuracy here: the stack trace is exactly what you need.

context ▼▼▼accuracy ▲
Scope

Use text for errors

A screenshot of an error can cost several times more tokens than the same information as text, and it is harder for the model to read reliably. Reserve images for visual or layout issues; copy the text for errors.

Writing out metric values instead of attaching Grafana screenshots frees substantial space.

context ▼▼▼accuracy ▲