A publication for engineering leaders on the structural and organizational fractures that emerge as codebases, teams, and processes grow fas

Giving New Engineers and Their AI Agents a Single Search Surface Across Every Repository

A unified search index lets engineers and AI agents find code across fragmented repositories.

· 10 min read
Cover illustration for “Giving New Engineers and Their AI Agents a Single Search Surface Across Every Repository”
Onboarding at Scale · October 9, 2026 · 10 min read · 2,337 words

A new engineer staring at an unfamiliar codebase and an AI coding agent operating against that same codebase run into the identical wall: neither has organization-wide context, and both have to reconstruct understanding one query at a time, one repository at a time. That shared condition, not a difference in skill or capability, is the actual subject of this piece. Large organizations do not keep their code in one place. They accumulate it across multiple version-control systems, multiple hosting platforms, and multiple deployment environments, often simultaneously, and no platform-native search tool bridges all of those boundaries at once. For a new hire, this means the primary drag on reaching productivity is rarely the difficulty of writing code. It's figuring out how the pieces connect: which service calls which library, where a given config value actually takes effect, which of three similarly named repositories is the one that matters. An AI coding agent hits the same wall, but from a different angle. Without a search surface that spans the organization's repositories, the agent falls back on brute-force file reads, opening files sequentially and guessing at relevance, because it cannot see what it isn't shown on the local machine. The problem gets worse as organizations run leaner. When experienced engineers who carry codebase context in their heads leave or get stretched thinner, there are fewer people available to run design reviews, mentor new hires, or serve as the informal fallback that both junior engineers and AI agents have historically relied on when formal documentation runs out.

Cost of Per-Repository Search, in Engineering Time and Agent Tokens

Search confined to one repository at a time is not free. It imposes a cost that grows with the number of repositories involved and with how often changes cut across them, since every cross-boundary question requires someone to manually stitch together results from separate searches. For human engineers, that cost lands disproportionately on senior staff. A new hire who can't find an answer alone escalates to someone more experienced, and that senior engineer doesn't just lose the few minutes it takes to answer. Deep, focused work takes time to resume after any interruption, so the real cost includes the recovery period that follows the interruption, not just the interruption itself. The damage compounds when onboarding materials are stale: new engineers who hit deprecated API references or outdated architecture diagrams spend a meaningful chunk of their first week chasing down corrections instead of learning how the system actually works today. Teams that connect documentation directly to the underlying source, so a claim in a doc can be checked against the code itself, see new hires ask noticeably fewer orientation questions by weeks two through four. That pattern suggests the bottleneck is the search surface itself, not the volume of documentation sitting behind it.

AI agents pay a parallel cost, denominated in tokens and in the quality of what they produce. Without a structured way to search across repositories, an agent discovers code structure by reading files one after another, the same information a proper index could return in a single query, at a fraction of the expense. Swapping grep-style file discovery for a semantic MCP-based search tool can cut token costs substantially on large codebases, simply because the agent stops burning context reading files it didn't need in order to find the one it did. Text search makes the problem worse before it makes it better. A query for a field as common as accountId in a large enterprise system can return tens of thousands of hits spread across comments, docstrings, variable declarations, and test fixtures, with no way to tell from the result list whether any given match is a live call site, dead code, or a coincidental string. That flood of undifferentiated results is precisely the gap that a different kind of search, one that understands code structurally rather than textually, is built to close.

What cross-repository symbol search does that text search cannot

Symbol search works at the level of the abstract syntax tree, not characters on a line. It can recognize that processPayment, defined once in a billing service, is the same function being invoked from three other repositories, not a string that happens to recur in several files. Making that recognition work across repository boundaries requires a unified index: one that ingests code from every repository involved, resolves the import chains between them, and treats a function exported from one package and imported into another as a single symbol rather than two unrelated strings that happen to match.

This is exactly where IDE-based search tools run out of road. An IDE understands the project open in front of it, and sometimes the dependencies that project explicitly declares, but it has no visibility into the repositories that consume what that project exports. You can't see, from inside a shared library's own development environment, the teams that call into it. If you build shared libraries or platform services consumed across many products, that's a structural blind spot rather than a minor annoyance, because the consequences of a change ripple into codebases the original developer can't see from where they're sitting.

Heterogeneous codebases add a further complication. When a field originates in a COBOL program, passes through a JCL job, and lands in a downstream Java service, text search has no way to follow that chain. Symbol-aware search, built on language-specific parsers that each produce output in a common graph representation, can trace it. What symbol search changes, fundamentally, is the nature of code navigation itself: instead of an exploratory, time-consuming hunt through files and folders, it becomes a precise, structured query against an index that understands what the code means, not just what it says. The same structured answer comes back whether the query is a new engineer typing a plain-language question or an AI agent issuing a tool call.

GitHub Enterprise Server's Search Gap as a Representative Enterprise Problem

GitHub Enterprise Server is as good a place as any to see this problem play out concretely, because it shows the gap persisting inside the dominant version-control platform in the industry. By default, GitHub Enterprise Server relies on a built-in Elasticsearch index for code search across repositories hosted on the Enterprise Server instance. The newer, index-backed search experience available on GitHub.com is not supported on Enterprise Server. Searching across both environments at once, Enterprise Server repositories and GitHub.com repositories in a single query, requires turning on unified search through GitHub Connect, which itself depends on GitHub.com access and administrator configuration. Organizations running air-gapped or otherwise restricted environments cannot turn that feature on.

The practical result: an organization that runs code across both GitHub Enterprise Server and GitHub.com ends up, by default, with two separate search surfaces that return different results for the same query. That's the exact fragmentation that forces engineers to correlate results by hand, repository by repository, which is the cost this piece opened with.

The pattern is not specific to GitHub. Most large enterprises don't run one homogeneous version-control environment. Mainframe source, distributed services, web applications, and infrastructure code frequently live on different platforms inside the same company, and no platform-native search tool reaches across all of them. RhodeCode is a useful point of comparison here: it provides unified security and team collaboration across Git, Subversion, and Mercurial, giving developers a common set of tool integrations and a shared code review workflow across repositories regardless of which version-control system backs them. That's a genuinely useful capability, but repository management and cross-repository code search are different problems, and solving the first doesn't solve the second.

How MCP turned cross-repository search into agent infrastructure

A cross-repository search index becomes something more than a search tool the moment it's exposed through the Model Context Protocol. It turns into a structured evidence layer an AI agent can query the way a senior engineer draws on years of accumulated memory, pulling up the relevant fact on demand. Without that MCP-exposed surface, agents are stuck discovering code structure through brute-force file reads: sequential, costly in tokens, and bounded by whatever the agent happens to stumble across.

Engineering organizations working seriously on agent tooling are building MCP servers that expose structured search directly, so an agent can query information it has no efficient way to discover on its own, turning the search surface into something an agent calls directly through a tool invocation rather than a sequence of file opens.

MCP's adoption curve is the reason this matters beyond any single vendor's roadmap. OpenAI adopted MCP officially in March 2025, and Google DeepMind followed. MCP was subsequently donated to the Linux Foundation's Agentic AI Foundation, alongside AGENTS.md, a convention that has since been adopted across a large number of repositories. Official SDKs now cover TypeScript, Python, C#, Go, Rust, Java, Ruby, Swift, PHP, and Kotlin. A code-context MCP server built today plugs into Claude Code, Cursor, Codex, Windsurf, Continue.dev, and whatever agent comes next, without the server needing to be rebuilt for each one.

A newer category of tooling is forming around giving agents durable memory, so they don't have to rebuild context on every session. Tools such as codebase-memory-mcp and CodeGraph maintain persistent local knowledge graphs that carry over between sessions instead of re-indexing from zero each time, and they expose that graph through MCP so any compatible agent harness can query it. A unified code context layer, of the kind Sourcebot builds as a self-hosted platform indexing across repositories and surfacing code through natural-language search, gives an agent the same structural advantage a new engineer gets from a single search surface: the ability to find the relevant thing directly, instead of reading through everything irrelevant on the way there.

What a unified search surface must actually cover to serve both audiences

Serving new engineers and AI agents at once sets a higher bar than serving either one alone, because the surface has to be cross-repository, symbol-aware, multi-VCS, permission-scoped, and accessible through MCP, all at the same time, not as a set of separate features bolted together.

Cross-repository scope means the index spans every repository in the organization, not just the ones hosted on a single platform or sitting in a single environment, so a query for every caller of a given function returns results from all consuming repositories in one pass, rather than requiring a separate search per repository. Symbol awareness means the surface understands the structural meaning of code rather than matching text, distinguishing a genuine call site from a declaration, a test fixture, or a coincidental string match, which is the specific gap that made the accountId example earlier in this piece unusable as a search result. Multi-VCS and multi-language support matters because enterprise codebases mix Git, Subversion, and sometimes Mercurial, and mix COBOL, JCL, Java, Python, SQL, and.NET in the same organization. A unified index needs language-specific parsers that all produce output in a common graph representation, the same mechanism that made the COBOL-to-Java tracing example possible.

Permission-scoped results matter for a more basic reason: search results have to respect existing access controls, so a new engineer on one team doesn't see into repositories they're not authorized to view, and an AI agent acting on a user's behalf inherits that user's permissions. MCP accessibility means the surface can be queried through a structured tool interface, so an agent can issue a scoped query and get back a structured result. And because new engineers are not the only non-specialists who need to find things, the surface also has to answer plain-language queries, so PMs, support staff, and incoming hires can ask questions without first learning the organization's repository layout or a particular search syntax.

Sourcebot is a self-hosted code intelligence platform that deploys as a single Docker container inside an organization's own infrastructure, and it connects to every repository the organization runs without routing any code through an external vendor. It gives both human users, engineers, PMs, support staff, and new hires, and AI coding agents a single interface for searching, navigating, and understanding code across every repository the organization holds, covering the full set of requirements laid out above. New engineers get a natural-language interface for querying repositories and project tools directly, which cuts down the number of interruptions senior engineers otherwise absorb. AI agents get codebase context through MCP-based connectors, issuing structured queries to find what they need. Because the deployment is self-hosted, sensitive code never leaves the customer's own environment, which removes CLOUD Act exposure, removes the risk of a third party running inference over proprietary code, and removes uncertainty about where data physically resides. Sourcebot also separates the search layer from the model layer: teams pick their own LLM provider and keep control over where code is sent for inference, rather than having that choice bundled into the platform.

Other approaches to this problem exist and solve adjacent pieces of it well. Rust-based MCP servers built specifically for multi-repository semantic code search, combining vector embeddings with BM25 full-text retrieval and tree-sitter-based AST chunking, run fully offline with no GPU and no Docker requirement, giving agents symbol navigation and cross-repository query fan-out from a lightweight, CPU-only footprint. That kind of tool is well suited to a developer or small team that wants agent-facing code search without standing up infrastructure, though it's built primarily for the agent side of the problem rather than for the natural-language, cross-audience interface that onboarding a new human engineer also requires. Platforms like RhodeCode, discussed earlier for its cross-VCS repository management across Git, Subversion, and Mercurial, address version-control fragmentation directly but leave cross-repository symbol search to other tooling. Each of these is a reasonable answer to part of the problem this piece has laid out. Judging any of them, including Sourcebot, means checking it against the same five requirements: cross-repository scope, symbol awareness, multi-VCS and multi-language support, permission-scoped results, and MCP accessibility, since a surface that satisfies only some of those still leaves either the new engineer or the AI agent reconstructing context by hand.

Sources

  1. does the 'code search' feature support github enterprise server? or just Github.com? · community · Discussion #169801
  2. GitHub - flupkede/codesearch: Multi-repo semantic code search MCP server in Rust — hybrid vector + BM25 retrieval, tree-sitter AST chunking, fully offline. For OpenCode, Claude Code, Cursor, and any MCP client.
  3. Software Engineering at Google - Code Search
  4. (GitHub Enterprise Cloud) Search across all organizations in an enterprise · community · Discussion #49510
  5. How we rebuilt the search architecture for high availability in GitHub Enterprise Server - The GitHub Blog
  6. The 2026-07-28 Specification
  7. Scaling AI Agent Infrastructure with the MCP Stateless updates - Google Developers Blog

More in Onboarding at Scale