Autonomous agents now in closed beta. Get early access Bito Ai

The context layer your coding agent is missing 

Technical design in hours, not days 

Cursor’s limits on large codebases and monorepos

Cursor's limits on large codebases

Table of Contents

The failure modes are consistent across teams that hit them. Refactors stop being consistent halfway through, retrieval misses call sites sitting in the same file tree, agent memory resets mid-task, and the design decisions that shaped the code have no path into Cursor’s index. 

These reflect the shape of the retrieval-augmented pipeline covered in How Cursor’s codebase indexing works under the hood, seen from the other side of its scale ceiling. The design compresses aggressively before the language model sees anything, and the compression sets the ceiling. 

Four failure modes surface consistently at scale: cross-repo blindness, retrieval misses on multi-file changes, weak planning on cross-service refactors, and missing business context from tickets and design docs. 

Flowchart showing Cursor's context pipeline and its coverage of different codebase sizes. Three input codebases sit at the top: small at 500 files and ~5M tokens, medium at 5,000 files and ~50M tokens, and large monorepo at 50,000+ files and 500M+ tokens. All three feed into Cursor's context pipeline, which runs three stages: embedding search returns the top ~100 chunks at ~500K tokens, importance ranking cuts to the top 20 chunks at ~50K tokens, and smart truncation fits the result into the model's window at 8K to 50K tokens. The pipeline outputs to the language model context in either normal mode at 200K tokens or Max mode at 1M tokens. The coverage results show a small codebase gets roughly 5% coverage and works well, a medium codebase gets roughly 0.1% coverage and works only for narrow queries, and a large monorepo gets less than 0.01% coverage and fails for anything non-trivial.

Cross-repo blindness stays hard even with multi-root 

Cursor’s April 2026 release added multi-root workspaces, which let one agent session cover multiple folder roots. A team can open the API service, the frontend, and the shared schema package in one workspace, and the agent can navigate across them. This partly addresses cross-repo work. 

Three specific issues remain, and each surfaces reliably in production teams: 

  • Symbol collision inflates ambiguity. Three roots each defining User, Order, auth.py, or package.json return retrieval candidates from all three. The agent has to disambiguate on every query, and Cursor’s public docs leave the disambiguation approach underspecified. 
  • Rule composition stays unclear. Each root’s .cursorrules and .cursor/rules/*.mdc file activates when the agent works in that root, but how rules from Root A interact with edits in Root B is unspecified in Cursor’s published documentation. 
  • Per-root indexing multiplies cost. Each additional root adds its own indexing time and memory pressure. Teams with four production repos in one workspace report cumulative RAM exceeding 100GB and indexing loops that never converge. 

The pattern is that multi-root workspaces make cross-repo work possible without making it reliable. Teams that need reliable cross-repo work end up encoding contracts in .cursor/rules files, which is closer to hand-written documentation than to actual retrieval across the graph. 

Retrieval misses on multi-file changes 

Cursor’s context window in normal mode holds 200,000 tokens, and Max Mode extends this to 1 million tokens on supported models. Both numbers sound generous until you compare them to the codebase. 

A mid-sized production codebase with 500 files and 100,000 lines of code holds roughly 5 million tokens. A monorepo with 50,000 files holds 500 million or more. Cursor’s normal mode covers 0.04% of the medium codebase and 0.00004% of the large monorepo. 

The pipeline compresses aggressively before the language model sees anything. Embedding search returns the top ~100 files at roughly 500K tokens, importance ranking cuts to the top 20 files at roughly 50K tokens, and smart truncation packs the result into 8K to 50K tokens of actual prompt context. 

This arithmetic is fine when a change is narrow and semantically clustered. 

It breaks down when a function rename has to reach call sites in files that fall outside the top-20 ranking, or when a signature change propagates through files that use different vocabulary, or when a refactor spans code that similarity retrieval never picked as relevant. 

The failure is structural. Similarity retrieval scores chunks by resemblance to the query, and connectedness through import edges or call chains has no representation in the scoring. Files that are architecturally related but semantically distant end up outside the retrieval window every time. 

Long refactors lose their thread 

A refactor that touches 40 files runs into a limit that sits beyond retrieval quality and context window size. The summarization step that fires when the window fills is where this one lives. 

Flowchart showing state degradation across a 40-file refactor in Cursor, in four stages from left to right. Files 1 through 10 with context window 15% used, all prior state in view, and pattern consistency high. Files 11 through 20 with context window 60% used, files 1 through 3 summarized, and minor pattern drift possible. Files 21 through 30 with context window 90% used, files 1 through 15 compressed into summaries, and moderate drift emerging. Files 31 through 40 with context window reset via the summarization step, files 1 through 25 in a condensed summary, and significant drift in the patterns applied to later files.

Cursor’s own dynamic context discovery post documents this step. When the context window fills, Cursor triggers summarization to compress earlier work into a shorter representation and free room for new work. The summarization is lossy by design. 

The loss is where drift begins. Files 1 through 20 of the refactor apply the pattern the developer specified while the original context stays in view. Files 21 through 40 apply a pattern that the model reconstructed from a summary of the earlier work, and the reconstruction is where variance creeps in. 

Reports from production teams document this pattern consistently. Multi-file refactors return with the first N files handled correctly and later files receiving inconsistent edits, or logic silently duplicated across files that the model treated as unrelated. Some of these defects surface only in staging or production. 

The failure is compression itself. Earlier state gets summarized when the window fills, and the summary loses the specifics of what was decided. 

The retrieval boundary at business context 

Cursor’s index carries code and, through @Docs, curated documentation. The reasoning that produced the code lives elsewhere. 

A payment retry policy might exist because of a vendor outage documented in a Jira ticket from two years ago. A defensive check might be there because of a review comment from a senior engineer who left the company. A schema column might be populated because a downstream auditor reads it every quarter. 

The retrieval mechanism has no path to any of this. Even MCP integrations that connect Cursor to Jira or Linear surface tickets as separate tool calls rather than as ranked chunks in the same retrieval graph as the code. 

The tickets sit alongside the retrieval pipeline rather than inside it. What sits inside the code, retrieval can find. What sits outside the code, in tickets, design docs, review threads, and the collective memory of the team, remains outside the pipeline. 

This is a category boundary. RAG over code operates on the code itself, and the reasoning behind code lives in a different substrate that the retrieval graph has no way to score. 

The four failure modes side by side 

Failure mode Root mechanism Where it surfaces first 
Cross-repo blindness Per-workspace indexing scope, symbol collision, unclear rule composition Multi-repo services, shared schema packages, cross-service refactors 
Retrieval misses Similarity ranking over architectural relations Function renames, signature changes, callers with different vocabulary 
Long refactor drift Lossy summarization on context fill Any change touching 20+ files where patterns must stay consistent 
Business context gap Code-only retrieval graph Non-functional requirements, historical decisions, compliance-driven code 

Extending Cursor at scale with Bito’s AI Architect 

Each failure above traces back to the same architectural choice, chunking code into embeddings and retrieving by similarity. Structure itself is what retrieval leaves out at scale, the connections between files, services, and the decisions that shaped them. 

Bito’s AI Architect operates on that layer with a typed knowledge graph across every repository. Classes, functions, and APIs connect through dependency, dataflow, and call-chain edges, and tickets from Jira, Slack threads, and Confluence docs enter the same graph. 

Each failure resolves differently against a graph. Cross-repo blindness disappears when the graph spans repositories. Retrieval misses give way to deterministic edge traversal. Long-refactor drift shrinks because the graph is persistent state. Business context enters as first-class ranked chunks alongside the code. 

Cursor queries this graph through MCP, and the agent grounds every change in what the graph returns. Cursor’s retrieval continues to handle fast local queries on semantically similar chunks, and the graph handles cross-repo reasoning, deterministic impact analysis, and the business context that shaped the code. 

Bottom line 

These four failure modes deepen as the codebase grows. No tuning of .cursorignore, no refinement of .cursorrules, no Max Mode toggle fixes what happens when retrieval as an architecture meets a codebase whose complexity has outgrown it. 

The decision at this scale is architectural. How Cursor’s codebase indexing works under the hood covers the design that produces these failures, and Cursor alternatives show tools that have made different architectural bets under the surface. 

Picture of Akanksha Choudhary

Akanksha Choudhary

As Bito’s Lead Engineer, Akanksha brings over eight years of experience building and scaling backend systems across fintech, conversational AI, and e-commerce domains. She is passionate about code quality, thoughtful reviews, and improving developer productivity, with a strong focus on backend infrastructure and system design. Akanksha enjoys helping teams build reliable, scalable software and ship with confidence.

Picture of Amar Goel

Amar Goel

Amar is the Co-founder and CEO of Bito. With a background in software engineering and economics, Amar is a serial entrepreneur and has founded multiple companies including the publicly traded PubMatic and Komli Media.

Written by developers for developers red heart icon

This article is brought to you by the Bito team.

Latest posts

78% of your AI coding bill is the agent looking for your code

Code graphs explained for AI coding tools (2026 Guide)

The next big lever on AI spend sits between your coding agent and the model

Cursor’s limits on large codebases and monorepos

How Cursor’s codebase indexing works (2026 Guide) 

Top posts

78% of your AI coding bill is the agent looking for your code

Code graphs explained for AI coding tools (2026 Guide)

The next big lever on AI spend sits between your coding agent and the model

Cursor’s limits on large codebases and monorepos

How Cursor’s codebase indexing works (2026 Guide)