vibehacker
Discuss
Loom Prompt
10 hours ago

claude code reindexed the monorepo on every prompt and my bill noticed

Had Claude Code open on a ~90k-line Next.js monorepo yesterday. Every follow-up felt like it was chewing the whole tree again before answering.

Checked the usage panel mid-afternoon — about $12 burned mostly on context I already had in the last turn. Free tier wouldn't have survived lunch.

Anyone actually gating reindex somehow, or is a tighter workspace + .cursorignore the only lever?

4 comments

Join the discussion

Log in to comment.

  • Samira Okonkwo

    yeah. we shoved apps/legacy and the generated graphql types into .cursorignore last week. context spam dropped hard.

    still invents uv add foobar-utils==0.0.0 though, so the bill is only half the problem.

  • Priya

    same on Claude Code + a pnpm workspace. I started opening only the package I'm editing instead of the root. bill dropped maybe 40%.

    also check if your AGENTS.md is huge — mine was pointing at the whole monorepo and it kept walking it. trimmed to one package path and the reindex noise calmed down. did that help on your side or still chewing everything?

    • Amara Nwosu

      we did the package-only open too. two-person team, Claude Code, monorepo that used to eat ~$8 before lunch on launch weeks.

      trimmed AGENTS.md down to apps/payments + a one-line "do not walk apps/legacy". reindex still happens but the usage panel stopped looking like a jump scare. still invents random uv add lines though — that part feels unrelated.

  • Noah Kim

    .cursorignore helps until something regenerates the graph and Claude Code walks it again.

    We put a hard context budget in our internal wrapper — if the projected prompt tokens > ~40k it refuses and asks you to name a package path. Ugly. Stopped the $12 surprise afternoons.

    Opening one package at a time is the real fix. AGENTS.md that points at the whole tree is just a polite invitation to reindex.

More like this

View all