JioHotstar kept one coding agent fixed, swapped six retrieval setups, and found that code indexers, knowledge graphs and RAG did not reliably improve task completion or cut cost. A plain local checkout with search and file tools held its own. Sourcebot's small, exact tools did best on the hardest tasks, and semantic search helped mainly on vague requests. The study is small: 24 SWE-bench problems, run by one developer. Before you add an indexer to an iOS repo, run the same test yourself: same agent, same prompts, 10 to 20 of your own past tasks, with and without the retrieval server, at least twice.
JioHotstar's engineers wanted to know whether code indexers, knowledge graphs and RAG pipelines make coding agents better at real work. They kept the agent constant, swapped the retrieval layer, and measured accuracy, cost, turns and how the agent behaved. On InfoQ's write-up of the study, published on November 11, the headline finding is blunt: adding retrieval layers did not reliably improve task completion or cut token use. A locally checked-out repo with ordinary file tools held its own.
That matters if you build iOS apps with Claude Code, Cursor or any other agent, because the market for "give your agent a brain for your codebase" tools is busy right now. Most of them promise fewer blind searches and lower bills. This post walks through what JioHotstar actually tested, what the numbers say, where the study is thin, and then gives you a small harness to run the same comparison on your own Xcode project before you pay for or maintain an indexer. AI Coding Costs: Why Your Agent Bill Is Mostly Re-Reading (and 7 Ways to Cut It) explains where those bills come from.
What JioHotstar tested
The original post on the JioHotstar engineering blog, written by Abhishek Bansal and dated September 28, compares one baseline against five retrieval setups. InfoQ's Leela Kumili brought it to a wider audience this week, and that is why it is circulating among developers now.
The six setups were chosen to represent different ideas about how an agent should understand code:
- File System Tools (the baseline). The agent gets a local checkout plus standard search, file reads and directory listing. No index, no graph, no summaries.
- Sourcebot. Fast structural primitives backed by an index: grep, symbol definitions and references, file reads and tree listing. The team ran the v4 container image.
- Graphify. A code knowledge graph built from the AST and extracted relationships, which the agent can traverse.
- CocoIndex Code. Embedding search over indexed code chunks, configured with the local model nomic-ai/nomic-embed-text-v1.5.
- Repowise. Precomputed relationships plus generated wiki-style summaries, meant to answer higher-level questions.
- An in-house hybrid RAG proof of concept. Dense and sparse retrieval, AST-aware chunking, graph expansion and reranking, exposed over MCP.
The solving model was Claude Sonnet throughout. The benchmarks were a subset of SWE-bench Lite and SWE-bench Verified (one problem per repository, 24 problems in total), a subset of Sourcegraph's CodeScaleBench, and a custom harness of JioHotstar-specific questions scored by an LLM judge. The team excluded Repowise from the CodeScaleBench comparison because it was too expensive for that round and did not support the local sentence-transformers embedding setup that CocoIndex used.
One detail is easy to miss and it shapes how much weight you should put on the result: a single developer ran all of this on a local machine. The post says so plainly, and explains that indexing time and setup cost were part of the experiment, which is why the subsets are small.
What the results say
The plain baseline did not collapse
On concrete tasks, where the issue could be narrowed down through file names, symbols and exact strings, the File System Tools baseline was hard to beat. The authors call raw access to the repo "already a very strong retrieval system" when the agent can search, open files and iterate. Nothing about having embeddings or a graph made a setup better by default.
Sourcebot won on the hardest SWE-bench tasks, and it was cheaper
On the SWE-bench Verified subset, Sourcebot was both more accurate than the baseline and cheaper. The explanation in the post is about tool shape rather than index quality. Sourcebot's tools are narrow and composable: grep returns exact matches, symbol lookup returns real definitions and references, and read_file returns source rather than a paraphrase of it. The agent can stay in a tight loop of search, verify, read and patch, without translating a high-level answer back into code. The tool-call breakdown also showed the agent reaching for Sourcebot's MCP tools far more often than for the other systems.
On easier tasks, retrieval mostly added cost
On SWE-bench Lite, Graphify solved one more task than the baseline. Most other modes just added cost and turns for similar results. When the agent already knows roughly where to look, a summary or graph result still has to be checked against the raw file before any edit, so the extra layer becomes overhead.
Semantic search helped when the task was vague
CodeScaleBench gave the clearest signal in favor of embeddings: the semantic index did best on tasks where the agent first had to work out what the person meant before it could find the code. Cost and score did not move together, though. On the common subset the team reports, the totals were about $2.08 for Sourcebot, $2.50 for the File System Tools baseline, $2.99 for CocoIndex, $3.63 for Graphify and $3.92 for the in-house knowledge base.
The agent liked tools that look like developer actions
The most useful takeaway in the post is about ergonomics. Across the runs, the agent kept choosing tools that resembled what an engineer does by hand: grep, read a file, look up a symbol. In the internal comparison of Sourcebot's MCP server against GitHub's MCP server, Sourcebot reduced "search wandering" better, which the authors put down to its primitives (grep, read_file, list_tree, find_symbol_definitions) matching how people debug.
Their one-sentence summary is worth keeping on a sticky note: semantic indexing wins when the problem is not well defined, and structural, keyword-style navigation wins when it is.
The cost figures against the baseline
The five totals are easier to read as a difference from the plain setup. This is arithmetic on the numbers above and nothing more.
| Setup | Total on the common subset | Against the baseline |
|---|---|---|
| Sourcebot | $2.08 | 17% less |
| File System Tools (baseline) | $2.50 | Baseline |
| CocoIndex Code | $2.99 | 20% more |
| Graphify | $3.63 | 45% more |
| In-house knowledge base | $3.92 | 57% more |
Only one of the four layers cost less than doing nothing. The other three have to buy enough extra accuracy to justify a bill that is 20% to 57% higher, and the time spent building and refreshing an index is a further cost on your side. Keep that framing for your own test. The question is not whether a retrieval layer helps at all. It is whether it helps enough to cover what it adds.
Where the study is thin
Treat this as a useful field report, not a ranking. The SWE-bench portion is 24 problems. The CodeScaleBench part is a subset. Each configuration seems to have been run once, and agent runs are not deterministic. In the InfoQ piece, Tarun Bhargava asks for exactly the missing piece: cost and accuracy figures from several runs of the same setup. Another commenter, Siddharth Vaithinathan, points out that agents also need architectural decisions, constraints and incident history, which none of these code-only tools capture.
The post also does not give the size of JioHotstar's codebase, and it does not include iOS projects as far as the write-up shows. Swift code in an Xcode project has its own quirks: generated files, storyboards and XIBs, asset catalogs, build settings buried in a project.pbxproj file, and Swift packages resolved into a cache outside the repo. Whether an indexer helps there is something you will only know by measuring on your own code.
What this means for an iOS repo
Most agent tasks in an app repo are concrete. "The paywall shows a blank price when StoreKit returns no products." "The build fails with a missing module after I added a Swift package." "Rename this view model and update its call sites." These name a screen, a type, an error string or a file. That is the shape of task where the baseline was strongest.
The vaguer tasks look like "make onboarding feel faster" or "find why some users get logged out." Those are where semantic search had an edge in the study, because the words in the request do not appear in the code.
So before you add anything, sort a sample of your recent agent sessions into those two piles. If almost everything you ask is concrete, a retrieval layer is more likely to add cost than save it. If you spend a lot of time on fuzzy, cross-cutting work in a large or unfamiliar codebase, it is worth a test.
Either way, the cheap wins come first:
- Make sure ripgrep is installed and the agent can run it. Fast exact search is the baseline the study found hard to beat.
- Keep generated and vendored code out of the agent's way. Build output, DerivedData copies, Pods if you still have them, and large generated files add noise to every search.
- Write a short map of the project in your agent instructions file: which target holds what, where networking lives, which folder is the design system, how to run the tests. A human-written map tells the agent where to grep, which is often all the "retrieval" a concrete task needs.
- Give the agent an exact test command for each area. A task that ends with a passing test is easier to verify than one that ends with a confident summary.
Run your own A/B test in an afternoon
The harness below follows JioHotstar's design: same agent, same prompt, same model, and only the retrieval layer changes. It uses Claude Code in non-interactive mode, because the flags you need are documented and the JSON output includes a cost estimate. You can adapt the idea to other agents that have a headless mode.
Step 1: build a small task set from your own history
Pick 10 to 20 bugs or small features your team already fixed. For each one, note the commit just before the fix, write the request the way you would have typed it to an agent, and write a check command that passes only when the work is done. A focused unit test is ideal. Include a few vague requests on purpose, so you can see whether the retrieval layer helps those more than the concrete ones.
Save each task as a file in a tasks folder, with the base commit and check on the first two lines and the prompt after a line of three dashes:
base: 3f2c1ab
check: xcodebuild test -scheme MyApp -destination 'platform=iOS Simulator,name=iPhone 17' -only-testing:MyAppTests/PaywallPriceTests -quiet
---
The paywall shows an empty price label when StoreKit returns no products.
Show a retry state instead and keep the purchase button disabled until products load.
Change the simulator name to one your Xcode has installed (xcrun simctl list devices shows them). List the task IDs, one per line, in tasks.txt.
Step 2: put the retrieval server in an MCP config file
Follow your indexer's own guide to run it against your repo, then write its connection details into retrieval.mcp.json under a server named retrieval. Sourcebot, for example, has a "Connect a client" page for Claude Code and other MCP clients. Keep the server name as retrieval, because the script allows its tools by that name.
Step 3: run both arms
This script creates a fresh git worktree at the base commit for every run, runs Claude Code once without the server and once with it, runs your check command, and writes a CSV row per run:
#!/usr/bin/env bash
# kb-ab.sh: run each task twice in a clean worktree,
# once with plain tools ("plain") and once with an MCP retrieval server ("kb").
set -uo pipefail
ROOT="$PWD"
MCP="$ROOT/retrieval.mcp.json" # your indexer's MCP config, server named "retrieval"
mkdir -p "$ROOT/runs"
echo "task,arm,passed,cost_usd,claude_exit" > "$ROOT/results.csv"
while read -r id; do
[ -z "$id" ] && continue
spec="$ROOT/tasks/$id.md"
base=$(sed -n 's/^base: //p' "$spec")
check=$(sed -n 's/^check: //p' "$spec")
prompt=$(sed '1,/^---$/d' "$spec")
for arm in plain kb; do
wt="$ROOT/../ab-$id-$arm"
git worktree add -q --detach "$wt" "$base"
extra=()
[ "$arm" = kb ] && extra=(--mcp-config "$MCP" --allowedTools "mcp__retrieval")
( cd "$wt" && claude --bare -p "$prompt" \
--tools "Bash,Read,Edit" --strict-mcp-config ${extra[@]+"${extra[@]}"} \
--permission-mode acceptEdits --max-turns 40 --max-budget-usd 3 \
--output-format json ) > "$ROOT/runs/$id-$arm.json"
code=$?
( cd "$wt" && eval "$check" ) > "$ROOT/runs/$id-$arm.check.log" 2>&1 \
&& passed=1 || passed=0
cost=$(jq -r '.total_cost_usd // "NA"' "$ROOT/runs/$id-$arm.json" 2>/dev/null || echo NA); cost=${cost:-NA}
echo "$id,$arm,$passed,$cost,$code" >> "$ROOT/results.csv"
git worktree remove --force "$wt"
done
done < "$ROOT/tasks.txt"
A few notes on the flags, all from Claude Code's CLI reference and headless docs:
--bareskips auto-discovery of hooks, skills, plugins, MCP servers, auto memory and CLAUDE.md, so a teammate's local setup cannot change the result. Bare mode does not use your subscription login, so setANTHROPIC_API_KEYfirst. If you want your project's CLAUDE.md in both arms, pass it with--append-system-prompt-fileinstead.--strict-mcp-configuses only the servers given with--mcp-config, so the plain arm runs with no MCP servers at all.--max-budget-usdand--max-turnsstop a run that wanders. The budget check uses Claude Code's client-side estimate, and spend can pass the cap, so leave some headroom.--output-format jsonincludestotal_cost_usd. The docs describe it as an estimate that can differ from your bill, which is fine for comparing two arms run the same way.- In acceptEdits mode, shell commands outside the read-only set still need an allow rule. If you want the agent to build or run tests itself, add something like
"Bash(xcodebuild *)"to--allowedToolsin both arms.
The script's control flow was tested on Linux with a fake repo and a stub in place of the claude binary, so the worktree, check and CSV steps run as written. The real agent runs, the MCP server and the xcodebuild check need your Mac and your project.
Step 4: read the results
Summarize pass rate and average cost per arm:
awk -F, 'NR>1 {n[$2]++; p[$2]+=$3; if ($4!="NA") {c[$2]+=$4; k[$2]++}}
END {for (a in n) printf "%s: %d/%d passed, avg $%.2f per task\n", a, p[a], n[a], (k[a] ? c[a]/k[a] : 0)}' results.csv
Then split the table by the concrete and vague labels you gave the tasks. JioHotstar's finding predicts the retrieval arm will do relatively better on the vague ones. If your numbers say the same, you have a reason to turn the server on only for that kind of work instead of for every session.
Run the whole set at least twice, ideally three times. This is the gap the InfoQ commenters pointed at, and with 10 to 20 tasks a single lucky or unlucky run can flip the conclusion. Ripple-65B vs Mistral Large 4: The Scores Don't Compare, So Test Both on Your Repo takes the same test-it-on-your-own-repo approach to choosing a model.
Step 5: look at the trace, not just the score
The authors recommend measuring tool-use traces alongside accuracy, because the way an agent uses a tool tells you whether it helps. To capture a trace, rerun one interesting task with --output-format stream-json --verbose in place of the JSON output and save it to a file. Then count which tools the agent called:
jq -r 'select(.type=="assistant") | .message.content[]? | select(.type=="tool_use") | .name' run.jsonl \
| sort | uniq -c | sort -rn
If the retrieval server's tools barely appear, the agent is ignoring it and you are paying for indexing for nothing. If they appear constantly but every call is followed by a Read of the same file, the tool is giving answers the agent does not trust. If its calls replace long runs of grep and directory listing, it is doing what you hoped.
Running the harness on a Mac: one fix that matters
The note above says the script was tested on Linux. It was also run on macOS 26.0.1 with the system's bash 3.2, a sample Git repo, three tasks and a stub in place of claude. An earlier draft of the script failed there in a way worth knowing about, because it would have skewed the result without stopping the run. With set -u, bash 3.2 treats an empty array as an unset variable. The plain arm passes an empty extra array, so every plain run died with "extra[@]: unbound variable" before the agent started, and the CSV recorded all of them as failed. The retrieval arm ran normally. Anyone reading that table would have concluded the indexer won every task.
The script above uses ${extra[@]+"${extra[@]}"}, which expands to nothing when the array is empty and works on bash 3.2 and newer. It also writes NA when a run produced no cost figure. With those two changes, the stub run on the Mac produced this file, and the worktrees were created and removed for all six runs:
task,arm,passed,cost_usd,claude_exit
t1,plain,1,0.48,0
t1,kb,1,0.61,0
t2,plain,0,0.48,0
t2,kb,1,0.61,0
t3,plain,1,0.48,0
t3,kb,1,0.61,0
The summary command from Step 4, run with the awk that ships with macOS, printed "plain: 2/3 passed, avg $0.48 per task" and "kb: 3/3 passed, avg $0.61 per task". The jq command from Step 5 ran with the jq in /usr/bin. The costs and results are whatever the stub was told to return. They prove the plumbing and say nothing about retrieval. Before your first real run, do the same check: look at the plain rows and confirm they have a cost and an exit code of 0. A column of failures with no cost means the agent never ran.
Is the gap real? Compare the pairs
Both arms run the same tasks, so the fair comparison is task by task. A task that both arms pass, or both fail, says nothing about which is better. Only the tasks where they disagree count. This script reads results.csv, counts those, and reports how often a split that lopsided would turn up if the two arms were equally good.
# paired.py: compare two arms on the same tasks. Only tasks where the arms
# disagree carry information, so count those and ask how often a split this
# lopsided would happen by chance. Usage: python3 paired.py results.csv
import csv, sys
from math import comb
runs = {}
for row in csv.DictReader(open(sys.argv[1])):
runs.setdefault(row["task"], {})[row["arm"]] = row["passed"] == "1"
pairs = [r for r in runs.values() if "plain" in r and "kb" in r]
kb_only = sum(1 for r in pairs if r["kb"] and not r["plain"])
plain_only = sum(1 for r in pairs if r["plain"] and not r["kb"])
n = kb_only + plain_only
tail = sum(comb(n, i) for i in range(max(kb_only, plain_only), n + 1)) / 2 ** n if n else 1.0
print(f"{len(pairs)} tasks, {len(pairs) - n} same result in both arms")
print(f"kb passed alone: {kb_only}, plain passed alone: {plain_only}")
print(f"chance of a split this lopsided if the arms were equal: {min(1.0, 2 * tail):.1%}")
Run with Python 3.12 on made-up result files for a set of 20 tasks, it gave:
| Retrieval passed alone | Plain passed alone | Chance of a split this lopsided between equal arms |
|---|---|---|
| 3 | 1 | 62.5% |
| 4 | 0 | 12.5% |
| 5 | 1 | 21.9% |
| 6 | 0 | 3.1% |
| 8 | 1 | 3.9% |
The second row is the one to remember. Four tasks that only the retrieval arm solved, and none the other way, looks like a clean win, and it still happens by chance one time in eight. You need about six one-sided wins before the result is hard to explain as luck. That is why a single pass over 10 to 20 tasks rarely settles the question, and why the repeat runs in Step 4 matter. If you run the set three times, give the script one results file per run and see whether the split points the same way each time.
If you do keep a retrieval layer
The study's tool-design lesson applies whether you pick an off-the-shelf indexer or build something in-house:
- Prefer servers that expose small, exact primitives (search, read a file, find a definition, find references) over ones that return summaries. The agent has to verify a summary before it edits.
- Keep the plain file tools available. The baseline was strong in every benchmark, and the agent should be able to fall back to it.
- Count indexing as part of the cost. JioHotstar's post stresses that building or refreshing indexes per repository was a real part of the expense. In a busy app repo where files change all day, a stale index can point the agent at code that no longer exists.
- Re-run the A/B test when you change models. The study used Claude Sonnet. A different model may use the same tools differently.
For concrete work, the cheapest "retrieval" is often handing the agent the exact files and constraints for the task. If you do that a lot, Repo Context & Handoff: Portable Coding Context with Freshness Checks is a $39 local Node.js CLI from the JR Devhub store that packs the files, decisions and constraints of a coding task into a portable packet (Markdown, JSON or offline HTML) and checks whether those files have changed before you resume the task in any coding tool.
FAQ
Does this mean code indexers are useless?
No. Sourcebot beat the baseline on the hardest SWE-bench tasks while costing less, and semantic search helped on vague requests. The finding is that the benefit depends on the kind of task, and that most layers added cost on easy, concrete work.
Which model did JioHotstar use?
Claude Sonnet, kept the same across the benchmark runs. Results with other models may differ.
How many tasks do I need for my own test?
Ten to twenty real tasks, run at least twice per arm, is enough to spot a large difference. It is not enough to detect a small one, so do not switch tools over a one-task gap.
Can I run the harness with Cursor or another agent?
The idea carries over to any agent with a headless mode and MCP support: same prompt, same model, fresh checkout, one variable changed. The flags in the script are specific to Claude Code.
Does the harness run with the bash that ships with macOS?
Yes. It was run on macOS 26.0.1 with bash 3.2 and a stub agent. The one thing that needed care was the empty array in the plain arm, which bash 3.2 rejects under set -u unless it is written as ${extra[@]+"${extra[@]}"}, the form the script uses.
Keep reading on JR Devhub
- 7 GitHub Repos That Shrink Your AI Agent's Token Bill
- The Best Coding Agent Fully Finished 26% of Real Tasks. Write Your Acceptance Criteria Before You Prompt
- 10 GitHub Tools for Running AI Coding Agents in Parallel
- Anthropic Tested How AI Agents Remember. Shrink and Fix Your Claude Code Memory in an iOS Repo
Sources
- InfoQ: JioHotstar Benchmarks Knowledge Bases for AI Coding Agents (Leela Kumili, Nov 11, 2026)
- JioHotstar: What We Learned from Benchmarking Knowledge Bases for Coding Agents (Abhishek Bansal)
- Claude Code docs: Run Claude Code programmatically
- Claude Code docs: CLI reference
- Sourcebot docs: MCP server
- CodeScaleBench on GitHub
- SWE-bench

Comments