Cursor Rules — Make .cursorrules Actually Earn Its Keep
Rules anatomy, when to use .cursor/rules/*.mdc vs the legacy .cursorrules, and how to write rules the model actually follows.
Articles tagged with #Cursor
Rules anatomy, when to use .cursor/rules/*.mdc vs the legacy .cursorrules, and how to write rules the model actually follows.
You close Cursor, reopen it, and the chat or Composer history is empty or shows only the last thread. Usually storage corruption, sync issues, or workspace mismatch. Recover and prevent.
You hit Cmd-K, type the change, and the inline popup spins forever. No diff, no commit, no error. Usually network, model, or context. Walk the four root causes.
The Extensions panel in Cursor returns a network error or an empty list. Cursor uses Open VSX, not Microsoft's marketplace. Configure the right gallery and unblock the install.
You added an MCP server in Cursor settings but it shows disconnected, or the tools never appear in Composer. Usually transport, path, or schema. Diagnose and fix in five minutes.
After a rebase or branch switch, Cursor references files and line numbers that no longer exist. Indexer fell behind your git state. Force re-index and harden the workflow.
Agent mode keeps running shell commands without the confirm prompt, even when you flipped the toggle off. Usually allowlist scope, stale settings, or a workspace override. Fix it.
Cursor's Auto model router routes a complex refactor to a small model, producing shallow or wrong edits. Diagnose routing signals and force the right model for hard tasks.
Cursor picks the system Python instead of your project venv, breaking imports, linting, and agent-generated code. Diagnose the interpreter picker, venv discovery, and shell PATH.
Cursor Settings Sync pushes outdated config to a second machine, clobbering local rules, keybindings, or MCP servers. Diagnose conflict direction, last-write-wins, and selective sync.
Cursor's SSH Remote session disconnects while you are editing, losing the agent context and unsaved buffer state. Diagnose the keepalive, network, and remote extension host.
Agent mode shows a spinner forever on a tool call — usually a hung shell command, network block, or a permission prompt you never accepted.
Composer started strong then forgot which file it was editing — context window blew up; chunk the refactor and recheckpoint.
Composer ignores your .cursorrules — usually wrong filename, wrong location, or new-format/old-format mismatch.
Month starts with 500 fast requests, days later you're stuck on slow — how fast vs slow actually works and how to stretch your quota.
Site advertises Opus 4.7 but the local Settings → Models dropdown doesn't show it — old client, stale cache, or staged rollout.
Project root has .cursorrules and Composer ignores it — wrong location, BOM/encoding, old client missing new .cursor/rules format, or cache.
Cursor's real learning curve isn't install — it's knowing when to use Tab, Inline edit, Composer, Chat, or Agent. Four real edits, one per AI surface, in an hour.
A well-tuned index is the difference between Cursor "getting" your code and not.
You hit Apply, Cursor says it's done, but the file never changed — usually a stale snapshot, an outside edit, or a locked file.
Cursor shows edits but Apply does nothing or fails silently.
Composer is great in a small repo and loses the thread in a 50k-file monorepo. Force focus with explicit context, not heroic indexing.
Composer rewrote 10+ files and broke working code — prompt was too open and the agent had too much default scope.
Open a team repo and Cursor's formatting / AI behavior changes — the repo's .vscode/settings.json overrode your user settings.
The context panel doesn't show the file you expected — retrieval scored low, the file is ignored, or it's too new to be indexed.
Composer hands you a 30-file / 2000-line diff and you can't review it honestly — splitting it into smaller PRs is the only safe move.
AI wrote a new formatDate but src/utils already has one — existing helpers weren't in retrieval; make them findable.
Editor shows old content after an AI edit, or save says "file modified externally" — watcher / AI write race.
Composer says done and touched files lint clean, but npm build fails — classic signature drift, missing import, or stale codegen.
Index spinner runs for hours with no progress — usually a huge repo, wrong ignore config, symlink loops, or permission failures.
Cursor edits only what it can "see" — fix by adjusting indexing scope and explicit @file references.
You @ one file and Cursor answers about a different same-named file — ambiguity, stale index, or symlink confusion.
Cursor pulls in old / vendored / generated files into context. Fix the index and ignore lists.
Tab and Composer use different naming / formatting / patterns than your repo — training prior beats retrieval; anchor explicitly.
Grey inline completions vanished — Tab toggled off, sign-in expired, Copilot stealing the key, or current file is too large / unsupported.
Agent runs a shell command and gets confused — wrong working dir, wrong package manager, env not loaded, or output truncated.
Claude Code is a terminal agent; Cursor is an in-editor copilot. Task fit, debug loop, and rollback cost differ. A decision sheet.
From install to your first useful edit in 30 minutes: Inline vs Composer vs Chat, codebase indexing, @Files context injection, Apply, and rollback.
Cursor stuck on Indexing? 90% of the time it's trying to index node_modules, dist, .next, or cache directories. Here's the .cursorignore template and a clean rebuild flow.