Pages

Tuesday, June 16, 2026

How I Fixed Cursor Getting Slower Every Message (Desktop + CLI, Any OS)

By Vicente Arteaga Gomez

MisLinux

This is a standalone MisLinux article about a real performance problem I hit while working in large infrastructure repositories with AI coding agents. It reflects my own experience only; I am not affiliated with, sponsored by, or endorsed by Cursor or Anysphere.

The symptom was subtle at first and painful later:

  1. Open a repo. Start a chat. Everything feels snappy.
  2. After a few turns, typing in the chat box gets slower.
  3. After more turns, even single-character input lags noticeably.
  4. Activity Monitor / Task Manager / top shows Cursor helper or indexer processes burning CPU.

That pattern looked like model slowness. It was not. It was indexer churn.

What was actually happening

Cursor (IDE and CLI) indexes the workspace so agents can search and reason about files. That is useful when the indexed files are source code you edit.

It is harmful when the indexer keeps re-walking directories that never help coding:

Noise directoryWhy it hurts
history/ and **/history/Timestamped run artifacts, JSON dumps, screenshots
__pycache__/, .pytest_cache/Regenerated on every test run
node_modules/, vendor/ (when huge)Third-party trees
*.sqlite, large *.json, *.csvOperational databases and exports
Media (*.png, *.mp4, …)Useless for code intelligence, expensive to scan

In my ops repo, those paths added up to gigabytes of churn. The chat got slower because the indexer kept working, not because the model suddenly became dumb.

The fix: a root .cursorignore

Git has .gitignore. Cursor has .cursorignore at the workspace root (same glob semantics).

The goal is not to hide code. The goal is to starve the indexer of directories that agents should not treat as editable source.

Here is the template I use on large monorepos:

# Dependencies and build output
node_modules/
vendor/
dist/
build/
.next/
out/
target/
coverage/
.turbo/
.cache/

# Python/runtime caches
__pycache__/
*.pyc
venv/
.venv/
.pytest_cache/

# Generated / minified assets
*.min.js
*.min.css
*.bundle.js
*.d.ts.map
*.tsbuildinfo

# Operational data (not source)
*.csv
*.json.gz
*.parquet
*.sqlite
*.sql

# Lock files (large, low signal)
package-lock.json
yarn.lock
pnpm-lock.yaml
Cargo.lock

# Media
*.png
*.jpg
*.gif
*.svg
*.mp4
*.woff2

# Repo-specific noise — adapt these
history/
**/history/
operations/**/history/

Three rules that mattered most for me:

  1. Put .cursorignore at each repo root you open in Cursor (not only a parent folder).
  2. If you use a monorepo, consider opening the smallest subdirectory that contains the code you edit that day.
  3. After the first ignore file, restart Cursor once (or trigger reindex) so the exclusion actually applies.

How I verify the fix worked

I use a simple before/after checklist:

CheckPass criteria
Character latencyType in chat for 2 minutes — lag should stay flat, not climb
CPUCursor indexer/helper CPU should drop after reindex settles
Agent usefulnessAgent can still read the files you care about when explicitly referenced

If chat is still slow after a good .cursorignore, the next suspects are: opening too large a folder, an extension fighting the indexer, or a workspace with thousands of small files outside ignore rules.

Cursor CLI uses the same contract

If you run Cursor Agent from the CLI against a checkout, the same .cursorignore at that checkout root applies. CLI and IDE share the indexing model.

Practical CLI habit: cd into the service directory you are changing, not the entire 50 GB infrastructure tree, unless you truly need cross-repo context.

Windows, Linux, and macOS

The file name and location are the same on all platforms: .cursorignore in the project root.

Path separators inside patterns use forward slashes (Cursor/glob style), even on Windows.

Typical locations I open:

OSExample workspace root
Linux/var/www/my-service/
macOS~/Projects/my-service/
WindowsC:\Users\me\Projects\my-service\

When .cursorignore is not enough

It fixes indexer noise. It does not fix:

  • A chat session that already accumulated a huge context window — start a fresh chat after large investigations.
  • Needing files that you ignored — narrow ignores, or @-mention specific paths.
  • Multi-root workspaces where only one root has ignore rules — add .cursorignore per root.

My decision rule now

Before blaming the model or switching tools, I ask:

> Is the indexer eating directories that are not source code?

If yes, I fix .cursorignore first. That single file has saved me more wall-clock time than any prompt tweak.

Related reading on MisLinux

If you use AI agents heavily in operations repos, these posts complement this one:

---

Independence note: Cursor is a product of Anysphere. This article describes my own troubleshooting workflow and is not official documentation from Cursor.