Blog
Cursor's Semantic Search Stops at the Repository Boundary
9 min read
Cursor's semantic search is scoped to the repository you have open. That is fine for monorepos and single-service projects. For microservice architectures — where most bugs of consequence cross at least two services — it means the AI can only see half the picture at best, and frequently less. You end up with an AI assistant that is excellent at answering questions about the service you are currently debugging and blind to everything the service interacts with.
What Cursor's semantic search can and cannot do
Cursor indexes each repository independently. Within a repo, the semantic search is genuinely useful — it finds conceptually related code even when exact keyword matches are absent. The boundary is the repository:
Cursor semantic search scope:
✓ Searches within the currently open repository
✓ Finds conceptually similar code within that repo
✓ Surfaces relevant files, functions, and patterns
✗ Cannot search across multiple repositories simultaneously
✗ Cannot follow data flows that cross service boundaries
✗ Cannot answer "what calls this endpoint from another service"This boundary is a design constraint, not a bug. Indexing multiple repositories simultaneously, maintaining cross-repo embeddings, and resolving cross-service relationships at query time is a significantly harder problem than single-repo retrieval. But the boundary matters enormously for how useful the tool is in practice on a microservice architecture.
The cross-service bug scenario
Most production bugs in distributed systems do not live entirely in one service. They typically involve a contract mismatch, a changed schema, a missing event, or a configuration drift between two services that nobody noticed until something broke. Cursor's single-repo index handles one side of this well and is blind to the other:
Scenario: order confirmation emails stopped sending
order-service (repo A): publishes ORDER_COMPLETED event
notification-service (repo B): subscribes to ORDER_COMPLETED
Developer opens Cursor in order-service:
→ searches for "order confirmation email"
→ finds nothing (email logic is in notification-service)
→ concludes: "email sending is not in this codebase"
Developer opens Cursor in notification-service:
→ searches for "order confirmation"
→ finds the handler but not the upstream trigger
→ cannot see that ORDER_COMPLETED event schema changed in order-serviceThe developer has done everything right — opened the relevant repos, used semantic search, read the relevant code. But the question they need to answer ("why did this schema change break the notification?") requires context from both repositories simultaneously. Cursor cannot provide that. This is the limitation that API contract changes break more than you think describes from the architectural side.
The class of questions that cannot be answered
Cross-service blindness creates a predictable set of unanswerable questions — all of which matter for debugging, impact analysis, and safe refactoring:
Questions Cursor's single-repo index cannot answer:
"What other services call the payment API?"
"If I change this event schema, what breaks downstream?"
"Which service is responsible for this data field?"
"What's the full flow from API request to database write?"
"Does anything depend on this internal queue topic name?"These are not edge-case questions. They are the everyday questions of impact analysis: "if I change this, what breaks?" A single-repo semantic index can tell you what changes within the repo. It cannot tell you what changes in the four services that depend on it. This is why even monorepos have this problem when teams are organized around service ownership rather than directory structure.
Why developers work around it and what that costs
The typical workaround is to open multiple Cursor windows — one per repo — and manually piece together the answer from each. This works but requires the developer to already know which repos are relevant, which means they need the cross-service knowledge that the tool was supposed to help them find. It is a loop: you need to know the answer to know where to look.
The other workaround is asking a senior developer who has the cross-service mental model. That works too, but it creates the exact bottleneck that AI tooling was supposed to eliminate — every complex debugging session routes through the one person who has the full system picture in their head. When that person leaves, the knowledge leaves with them.
What cross-repo indexing changes
Kognita indexes across your repositories as a unified semantic layer. Rather than separate per-repo indexes, behavioral relationships between services are reconstructed at index time — which services publish which events, which APIs are consumed where, which data flows cross service boundaries:
Cross-repo semantic layer:
order-service/ ─┐
payment-service/ ─┤─→ unified semantic index
notification/ ─┤ ↓
user-service/ ─┘ behavioral relationships
↓
"payment service → order event → notification"
answerable in one queryWhen a developer asks "what breaks if I change this event schema?", the answer comes from the unified index — surfacing every service that consumes that event, regardless of which repo it lives in. The question gets answered in one query instead of requiring four separate Cursor sessions stitched together manually.
Final take
Cursor's semantic search is a significant improvement over keyword search within a single repository. For projects organized in a single repo, it handles the retrieval problem well. For microservice architectures where the interesting questions cross service boundaries, the single-repo constraint means the AI can answer half your questions well and has no useful answer for the other half.
The pattern is consistent: AI coding tools get better at the questions that can be answered within a file or a repo, and leave unchanged the questions that require cross-service understanding. Cross-repo semantic indexing is what bridges the gap — not better retrieval within a single codebase, but behavioral relationships across all of them.