Abnormally high token use

i have a laravel codebase i’d say medium size, and today i asked cursor “auto” to upgrade react from 18 → 19.

That upgrade used 15m tokens.

At this rate cursor is unusable to me as the token cost is insane. This is my personal cursor account. and for context i have a work account that i use in a mono-repo and i NEVER use this many tokens - and i hammer that account at work.

Any suggestions on how i can investigate why so many tokens are being used for what i consider relatively straight forward usage.

as a follow up i can see the input is 10M tokens. what the hell! is it reading my node modules folder ?

Hey, I checked your usage. This isn’t a bug and it’s not node_modules. It’s just how the agent works under the hood.

Quick version: upgrade React 18→19 turns into a long chain of iterations for the agent like grep package.json, read components, edit, verify imports, and so on. In your case, the agent did 155 tool calls in a single request. Each tool call is a separate model call that sends the entire accumulated context up to that point about 160K to 180K tokens on later iterations. So 155 × average context is 11M+ input tokens. The math checks out, even if it looks scary.

node_modules isn’t the main factor here. The biggest cost comes from the context growing between iterations, not from indexing.

What actually helps reduce usage:

  1. Split the work. Instead of upgrade React 18→19 all at once, break it down. First package.json and deps, then breaking changes in components in batches by folder, then tests. Each separate chat has its own context so it doesn’t keep growing.
  2. Add .cursorignore for node_modules/, vendor/, storage/, build outputs, and lock files so the agent doesn’t read them during search.
  3. Manually pick a model for predictable tasks instead of auto. A cheaper model often works fine if the task is narrow.
  4. Use Plan Mode before big upgrades. It builds a plan first without expensive edits so you can see the scope upfront. Plan Mode | Cursor Docs

Why your work account uses less is probably because you’re doing more targeted requests there, not run the entire migration in one pass.