Code Index as an Agent Tool: What Netflix Measured with a Headless IDE Engine

Watch a coding agent find where a method is used in a large Java repo. It runs grep, opens ten files, narrows the pattern, and opens five more. Every file it reads stays in the context, and you pay for each one. It is doing with text search what an IDE does in one lookup.
Netflix tested what happens when you give the agent that lookup. In a case study on the JetBrains blog, Netflix describes plugging a headless build of JetBrains' code intelligence engine, the one behind IntelliJ IDEA, into Claude Code and Codex, and benchmarking it. This post covers what they built, what the numbers mean, and how to run the same test on your own code.
What Netflix Built
The engine speaks the Language Server Protocol (LSP), but an agent cannot call an LSP server out of the box. Per the case study, Netflix wrote the missing piece itself, because JetBrains did not offer it yet: a daemon and a CLI that agents call.
- The daemon routes each call by project root to a server process that keeps that project's index warm in memory. Repeated calls do not pay for re-indexing.
- The CLI is what the agent runs, the same way it runs
grep. Both are written in Java and shipped as a GraalVM executable. - The target was Java and Kotlin navigation, where agents struggle most at library boundaries. JVM projects usually pull dependencies in as JAR files, not source, so text search inside the repo cannot see them.
Netflix ruled out two alternatives: a CLI that required a running IntelliJ IDEA instance, and the Eclipse-based Java language server, which did not work with Netflix's Gradle build.
What the Numbers Say
JetBrains reports that the engine made agents more efficient across every model, agent and task type tested: typically 20-30%, and about 65% in the best case. The gain depended on the model, the agent and the task. On the IntelliJ IDEA extension page, Netflix staff software engineer Paul Bakker describes the setup as "a benchmark with real programming tasks" and says agents used fewer tokens and less time.
Three things to keep in mind before you put that number in a slide:
- "Efficiency" is not one metric. The case study covers tokens and time to completion. The 65% is the best case, not a token figure you can expect on average.
- Correctness held. Correctness held steady or improved, so the savings did not come from agents giving up early.
- It is a vendor-hosted study. Netflix ran it, JetBrains published it, and we found no independent replication. The method is the useful part: same model, same task, with and without the tool.
JetBrains' earlier test of IDE-native search tools for agents is a caution, not a baseline. JetBrains later added a correction: the IDE tools were not actually called, the agents used ordinary shell tools that the chat UI displayed as "Search", so the post does not show that IDE-native search made agents faster or cheaper. It still points at the failure mode that matters most: models did not all use the tool. GPT-5.4-mini and GPT-5.5 made no IDE search calls in any of their 675 trajectories.
A code index you install but the model ignores saves nothing.
Deterministic Lookup vs grep
grep answers "where does this string appear?". A code index answers "where is this symbol defined, and who calls it?". The two questions overlap less than they seem:
- A method name like
retryorgetmatches comments, strings, tests and unrelated classes. The agent reads them all to filter them out. - Overloads and same-named classes in different packages look identical to text search. The index resolves them by type.
- Dependency code in JARs is invisible to
grepover the repo. The index has it. - A wrong
grepresult looks like a right one. An index lookup either resolves the symbol or fails clearly.
That is why we call these tools deterministic: the facts come from the compiler's model of the code, not from pattern matching.
Which Kind of Index to Use
"Code index" covers three different tools now. Pick by the question your agent asks most:
Text search (grep, rg) |
Symbol index (LSP, IDE engine) | Semantic index (embeddings) | |
|---|---|---|---|
| Answers | Where a string appears | Definitions, references, types, diagnostics | Code that means something close to the query |
| Precision | Exact text, noisy for common names | Exact symbols, resolved by type | Fuzzy, ranked |
| Sees dependencies | Only vendored source | Yes, if the build imports | Only what you indexed |
| Setup cost | None | Language server per language, build must import | Indexing job, embedding compute |
| Breaks when | Names are common | Build import fails, index goes stale | Query wording differs from code |
| Example | Built into every agent | Claude Code code intelligence plugins, Netflix's daemon | JetBrains Air Context |
They are not exclusive. Air Context describes itself as "a semantic code search service for AI coding agents" and works with Claude Code, OpenAI Codex and Junie CLI through the jbcontext CLI. By default it computes embeddings on the Air Context server, so it needs a network connection, though it can also compute them locally.
Try It in Claude Code
You do not need Netflix's daemon to start. Claude Code has code intelligence plugins: each one connects a language server, and Claude gets an LSP tool that "looks up symbols through the server instead of searching text for them." It also gets diagnostics after each edit. Official plugins cover Go, Java, Kotlin, Python, Rust, TypeScript and more. You install the language server binary yourself, and it must be on the PATH of the shell you start claude from:
npm install -g typescript-language-server typescript
Then, inside Claude Code:
/plugin install typescript-lsp@claude-plugins-official
For a language without an official plugin, the plugin components docs define an .lsp.json file that maps each server name directly to its configuration:
{
"gopls": {
"command": "gopls",
"args": ["serve"],
"extensionToLanguage": { ".go": "go" }
}
}
Two traps. The official Java plugin runs jdtls, the Eclipse JDT language server, which is the server Netflix found did not work with its Gradle build. Check that it imports your build before you trust its answers. And plugin language servers do not start in Claude Code cloud sessions, so a test that passes on your laptop may run on plain grep in the cloud.
Checklist: Measure It on Your Repo
- Pick 10 to 20 real tasks with known answers. Mix navigation ("find every caller of X") and end-to-end changes. Include at least one that crosses a dependency boundary.
- Run each task with and without the index, same model, same effort setting, a few times each. Agents are not deterministic.
- Record tokens by type, wall time and correctness. Score navigation answers against a fixed list, not by eye.
- Count tool adoption. What share of the agent's searches went to the index? If it is low, change the instructions in
CLAUDE.mdorAGENTS.mdbefore you judge the tool. - Check index health on every run. A failed build import leaves an empty or partial index, and the agent falls back to
grepwithout telling you. - Measure cold start separately. Netflix kept the index warm in a daemon for a reason. A first lookup that indexes the whole project can cost more than the
grepit replaces. - Test after edits. The index must see the agent's own changes, or the next lookup returns a stale answer.
Where This Fits in Akmatori
The same idea applies outside code: give the agent a precise lookup before it starts searching broadly. In Akmatori, as the architecture docs describe, the incident manager prompt makes context recall a fixed first step. The agent calls runbooks.search, then memory.search over cross-incident memory, then events.search for recent changes, all through gateway_call, and only then calls infrastructure tools. The order is written into the AGENTS.md that Akmatori generates for each run, so the agent is told to make these lookups first instead of being left to decide. For the cost side of the same problem, see where AI agent tokens go and how code mode cuts round trips.
Conclusion
Netflix's result is worth taking seriously because of how it was measured: same model, same task, with and without the tool. Plan around the typical 20-30%, not the best-case 65%, and expect it only when the build imports cleanly, the index stays warm and fresh, and the model calls the tool. Start with a language server plugin, run the checklist on your tasks, and keep grep for finding strings.
If your team wants AI-assisted incident workflows where agents look up runbooks, memory and recent changes before they search, Akmatori helps SRE teams investigate alerts, coordinate response, and automate safe infrastructure actions. Powered by Gcore for global infrastructure reliability.
