KognitaKognita.

Blog

Cursor's Codebase Index Goes Stale Fast on a Moving Team

9 min read

Cursor's codebase index updates incrementally as you save files — a smart design that keeps the index reasonably current without requiring a full re-scan every session. The problem shows up the moment you are working on a team: your local index reflects your local state, which is almost never the same as what everyone else has merged in the last 48 hours. On fast-moving teams, the gap between what Cursor knows and what the codebase actually is can be wide enough to generate confidently wrong answers.

How incremental indexing actually works

When you save a file in Cursor, the changed chunks are queued for re-embedding. This is faster than re-indexing everything on every save, and for a solo developer it mostly works — your index reflects your local working state. But the index is scoped to your machine, your clone, your pulled state:

What incremental indexing tracks (and doesn't)
Cursor incremental indexing:
  → File saved locally → embedding queued
  → Queue processes async (seconds to minutes)
  → Other developers' changes: not visible until pulled
  → Pulled but not opened: depends on background sync
  → In-progress file: index reflects last saved state

Files that other team members have changed and merged to main are invisible to your Cursor index until you pull them locally and open them in the editor. On a 10-person team pushing 20 PRs per week, the divergence between your index and the canonical codebase compounds by the hour.

The staleness failure mode in practice

The dangerous part is not that the index is stale — it is that Cursor does not tell you when it is. The same confident retrieval and suggestion quality applies whether the index is current or weeks behind. When the AI answers a question about a module that was renamed last Tuesday, it does so without any signal that the answer is based on old data:

A typical stale-index session on a 10-engineer team
10-engineer team, 20 PRs per week:
  Monday 9am:  Developer opens Cursor, index reflects Friday's state
  Monday 11am: 3 PRs merged — new service, renamed module, removed util
  Monday 1pm:  Developer asks Cursor about the renamed module
  Cursor responds confidently about the old structure
  Developer spends 30 min debugging AI advice that no longer applies

This is the mechanism behind context rot — the gradual, invisible divergence between what an AI tool thinks your codebase looks like and what it actually is. In a solo workflow, you notice quickly because you see every change. On a team, other people's changes are invisible until they break something.

Categories of stale context that cause real bugs

Not all staleness is equal. Some types create minor inconveniences; others produce suggestions that introduce bugs:

High-risk stale context categories
Categories of stale context in fast-moving codebases:
  → Renamed files / modules (AI uses old import paths)
  → Deleted utilities (AI suggests calling removed functions)
  → New services not yet in your local clone
  → Refactored interfaces (AI suggests old method signatures)
  → Moved business logic (AI looks in wrong service)

The most dangerous category is deleted utilities — when Cursor suggests calling a function that no longer exists, the code compiles fine until runtime, or silently uses a fallback that was not intended. This is exactly the pattern that AI dependency hallucination describes, but the cause is not model hallucination — it is a genuinely stale index presenting old facts.

The team desync problem

Beyond individual staleness, there is a team coherence problem. On a ten-person team, every developer runs their own local Cursor instance with their own local index. Those indexes are all different snapshots of the same codebase, at different points in time:

Snapshot divergence across a team
10-person team, each with local Cursor index:
  Alice's index:    reflects her last pull (yesterday)
  Bob's index:      reflects his last pull (this morning)
  Carol's index:    reflects her last pull (3 days ago)
  Server reality:   12 commits ahead of Carol's index
  Shared truth:     none — everyone is working from a different snapshot

There is no canonical shared index. There is no way to ask "what does our team's AI tooling know about this service right now?" Each developer's AI context is a private snapshot, and those snapshots diverge the faster the team ships. This is a different problem than AI coding at scale with 50 engineers, but the root cause is the same: per-developer local indexes do not compose into team intelligence.

Why pulling frequently does not fully fix it

The intuitive fix is to pull more often. If you pull every hour, your index is only an hour stale. In practice, frequent pulls help but do not solve the problem. Pulling updates your working tree but does not force Cursor to re-index changed files immediately — that happens lazily, as you open files or as the background sync catches up. During the window between pull and re-index, queries about changed areas can still return stale results.

More fundamentally, pulling more often is a workaround, not a fix. The architecture of a per-developer local index has a ceiling on how fresh it can be in a team setting.

What a server-side managed index changes

Kognita maintains a server-side semantic index that re-runs as your codebase changes — not per developer, but per repository. When a PR merges, the changed files get re-indexed against the merged state. Every developer on your team queries the same current index, not their individual local snapshot.

This eliminates the team desync problem by design. There is no per-developer state to diverge. The index reflects what is in the canonical branch, and it updates automatically after each merge. The result is that every session, for every developer, starts from the same ground truth — not a private snapshot that drifts further from reality as the week progresses.

Final take

Cursor's incremental local indexing is a smart design for individual developers. It keeps up with your local changes well, and for solo work it is largely accurate. The failure mode is team scale — when ten developers are each building their own local index of a shared codebase, those indexes diverge constantly, and the AI answers each of them with equal confidence regardless of how stale the underlying data is.

The fix is not a better pull strategy. It is a shared index that reflects the canonical codebase, updated automatically after each merge, served to the whole team from a single source. Per-developer local indexes do not scale to team-speed codebases.