Sourcegraph has introduced Code Finder, a dedicated search tool designed to improve how AI agents locate code in repositories.
What Is Code Finder?
Code Finder runs its own search loop across a codebase and returns only the relevant files and line ranges.
It includes a brief explanation of what each file does, so the coding agent receives a focused, actionable response.
How It Works
When a coding agent needs to find a specific piece of code, it typically opens files, scans them, and backtracks when it finds nothing.
Each of these actions consumes context window space and turns—resources that limit the agent’s ability to perform actual work.
Code Finder avoids this by performing the search independently. It runs a targeted search loop and returns only the files and lines that match the query.
Performance Benchmarks
- Code Finder completes tasks more than twice as fast as when a coding agent uses local search tools.
- It costs up to 40% less than when an agent calls Sourcegraph’s MCP tools, while delivering comparable result quality.
- The results are smaller and more focused, reducing the cognitive load on the agent.
Why It Matters
General-purpose coding agents carry large context windows and broad instruction sets.
These features make them inefficient for simple, repetitive tasks like file discovery.
Code Finder specializes in one function—finding code—making it faster and more cost-effective.
By offloading file discovery to a dedicated tool, agents can spend more time on actual coding tasks and less on navigation.

Where Is It Used?
Code Finder is available through the Sourcegraph MCP server.
It also powers file discovery in Deep Search, allowing that tool to save token budget for reasoning about code instead of searching.
Developers can integrate it into their own agents by connecting to the Sourcegraph MCP Server.
Limitations and Open Questions
The source material does not describe limitations or known edge cases of Code Finder.
It does not cover performance under very large or fragmented codebases, or how it handles versioned or private repositories.
There is no mention of integration with non-Sourcegraph environments or third-party codebases.
What to Watch Next
As AI agents grow more complex, tools like Code Finder will likely become standard components in development workflows.
Future versions may support real-time updates, cross-repo searches, or integration with version control systems.
Users should monitor the original source for updates and new features.
For organizations using AI agents to manage code updates, Agentic Batch Changes may offer complementary capabilities.
Sources & further reading
Featured image: Hillman Avenger, 2 tone + go faster stripe, no I… by Mick from Northamptonshire, England, CC BY 2.0, via Wikimedia Commons. Image source · License

