Cortex Hubagent benchmarklast run · 2026-10-23
Does the hub make an agent find the right code?
The same coding agent, the same model and the same prompt — once with only the repository it was asked about, once with every repository of the product on disk, and once with one repository plus Cortex. Each answer is scored mechanically from what the agent wrote. This page shows the harness, the tasks and every number, including the ones that did not move.
The harness
Three setups, one variable at a time
Every run is a headless claude -p session with Claude Sonnet, started in a throwaway git worktree pinned to a fixed commit. The prompt is identical across setups except for one sentence that tells the agent where the other repositories are — or that they are not on this machine.
The repository alone
What most agents get today: the repo the task is about, and nothing else. Cortex tools are disallowed.
cwd = one worktree
other repos: “not on this machine”
Every repository on disk
The ceiling for plain search: all seven repos checked out side by side, so grep sees everything. Cortex tools are disallowed.
cwd = seven worktrees
other repos: “next to you, here”
One repository + Cortex
Setup A plus exactly what the Cortex installer writes into a project — hooks, their settings, the /cs and /ce commands and the CLAUDE.md block — taken from the hub commit under test.
cwd = one worktree + install
hub: the organization's index
-
01
Fresh, pinned, isolated
Each run gets its own detached worktree at a fixed commit, removed when the run ends. Runs execute three at a time, interleaved by repetition so a slow hour hits every setup alike. Unrelated MCP servers on the machine are disabled in all setups.
-
02
No run can teach the next one
In setup B every hub tool that writes — knowledge, memory, notes, tasks, session summaries, re-indexing — is disallowed. Every run starts from the same hub state, so repetitions are independent and a good answer cannot be cached for the run after it.
read: search · grep · read · contextallowedwrite: store · notes · tasks · reindexdisallowed -
03
Scored from the transcript, not by eye
The run's
stream-jsontranscript is kept. Cost and turns come from its result event; tool calls are counted by kind — hub calls, file searches (the Grep tool plus anyrg,grep,findorgit grepin a shell), and file reads. Recall is computed from the final answer only, as below.
The tasks
Real questions from a real product
The product is one system split across seven private repositories: a server, a web front end, internal tools, two generations of a client, an older upstream codebase, analysis tools and protocol documentation. It grew over many years and several teams, so the same idea often lives in four places under four names. The model has never seen this code.
Find — the answer spans repositories
A question a developer actually asked, whose answer is spread over several repos. The agent is told not to change code and to end with the relevant files, one per line, as repo/path/to/file.
- Every implementation of the wire protocol's packet cipher — server, tools, docs, the upstream codebase, analysis notes.
- Where a login password is encoded, where the server decodes and checks it, and how each client does it.
- Every handler of one message type, on both sides of the connection.
Fix — a real bug, after the index
A bug the team fixed after the hub's index was built. The worktree starts at the fix's parent commit, so the index has never seen the answer. The prompt is the bug report.
- Six fixes from the server's history, each touching one or two files, none of them guessable from the file names alone.
- Scored by whether the agent changed the files the real fix changed, and by a judge model comparing the agent's diff with the real one: 0 wrong, 1 partial, 2 equivalent.
How a find task is scored
Each task carries one regular expression per repository that holds part of the answer. A group counts as found when the agent's final reply names a matching file. Recall is the share of groups found — so an answer that describes the right code without naming its file scores nothing for it.
This is deliberately strict and deliberately dumb: no judge, no partial credit, nothing a reviewer could argue about. It measures one thing — did the agent find the files.
// shape only — paths invented, the real ones are private { id: 'x-wire-crypto', kind: 'find', repo: '<docs repo>', // where the agent starts gold: { server: /net\/crypto\/\w+Cipher\.cs/, tools: /codec\/\w+Packet\.cs/, docs: /crypto\/\w+\.cs|protocol\.md/, upstream: /net\/Session\.cs/, notes: /decoder\.py|cipher\.md/, } } const hit = Object.entries(task.gold) .filter(([, re]) => re.test(finalAnswer)) recall = hit.length / Object.keys(task.gold).length
Results
Cross-repo questions: as good as “everything on disk”, for less
Three find tasks. Setup A shows the problem: from one repository the agent finds about a quarter of the answer. Putting all seven repositories on disk (AA) finds nearly all of it, but doubles the cost and the time. Setup B is the hub's job: get to AA's recall from A's footprint. In the latest run it did — 0.90 against 0.88, at 77% of the cost and 65% of the time.
| Setup | Runs | Recall | Cost / run | Turns | Minutes | Searches |
|---|---|---|---|---|---|---|
| Latest run · 5 repetitions | ||||||
| B · one repo + Cortexhub at v1.3.11 | 15 | 0.90 | $0.34 | 21.9 | 1.1 | 2.5 |
| AA · all seven repos on disk | 15 | 0.88 | $0.44 | 22.1 | 1.7 | 16.5 |
| Pilot · 3 repetitions | ||||||
| A · the repository alone | 9 | 0.26 | $0.24 | 10.2 | 1.0 | 7.1 |
| AA · all seven repos on disk | 9 | 0.95 | $0.46 | 21.3 | 2.0 | 16.2 |
| B · one repo + Cortexbefore the changes below | 9 | 0.59 | $0.26 | 14.3 | 1.2 | 4.6 |
Recall, latest of each
Share of answer groups whose file the agent named.
Searches = Grep tool calls plus shell rg/grep/find/git grep. In B most lookups go through the hub instead (16.1 hub calls per run on average). Cost is what the CLI reports for the run, at list price.
How B got from 0.59 to 0.90
Every miss was read in its transcript, the cause fixed in the hub, merged, deployed, and the same three tasks run again. Nothing in the tasks, prompts or scoring changed between rounds.
| Round | What changed in the hub | Runs | Recall | Cost / run |
|---|---|---|---|---|
| Baseline | Ranked hybrid search across the organization's repos, symbol context, knowledge recall.The agent searched well but could not prove a name was absent — a ranking never says “nowhere else”. | 9 | 0.59 | $0.26 |
| #95 | Reword hints judged within one session and one search scope.Stopped nudging the agent off a search that was in fact new. | 7 | 0.64 | — |
| #96 | Exact search and file reads across every repo of the organization.The agent can now grep repos that are not on its machine, and read the file it found. | 9 | 0.82 | $0.32 |
| #97 | A files-only mode: each matching file with a count, like grep -l.Remaining misses were not truncation — the agent's patterns never matched the file. The all-repos setup found it with one broad sweep, so the hub got the same move. | 9 | 0.86 | $0.32 |
| Latest | Same hub, more repetitions. | 15 | 0.90 | $0.34 |
Single-repo bug fixes: no difference, and we say so
On the six fix tasks the bug lives in the repository the agent starts in. Both setups changed the right files every time; the judge scored B's diffs slightly closer to the real fix, within noise. The hub is not what makes these tasks easier — it neither helps much nor gets in the way.
| Setup | Runs | Right files | Judge (0–2) | Cost / run | Turns | Searches |
|---|---|---|---|---|---|---|
| A · the repository alone | 18 | 1.00 | 1.50 | $0.21 | 14.2 | 9.4 |
| B · one repo + Cortex | 18 | 1.00 | 1.67 | $0.20 | 12.8 | 7.7 |
Retrieval
Underneath: how well the index ranks
The agent benchmark tests the whole loop. These test the search layer alone, with no model in the loop, and anyone can rerun them from benchmarks/.
Code search — this repository's own index
15 hand-written questions, each with one file that answers it. Same chunks and the same query embedding in every mode.
| Mode | r@1 | r@3 | r@10 | MRR |
|---|---|---|---|---|
| vector | 0.533 | 0.667 | 1.000 | 0.656 |
| BM25 | 0.267 | 0.667 | 1.000 | 0.530 |
| hybrid (RRF) — shipped | 0.600 | 0.733 | 1.000 | 0.703 |
| vector + LLM rerank | no change to r@1, +2.1 s and ~1.4k tokens per query | |||
The right file is always in the top 10 and first only about half the time — which is why the agent is told to scan all ten hits before choosing.
Knowledge recall — LongMemEval-S
500 questions over a shared haystack of past sessions, local embedder, no API key.
Limits
Read these before quoting a number
- Small n. Three find tasks and six fix tasks on one product. The numbers are evidence of direction, not a leaderboard.
- One model, one agent. Claude Sonnet through Claude Code. Other agents read the same hooks and tools, but are not measured here.
- The repositories are private. The agent runs cannot be reproduced outside the team; the retrieval benchmarks can.
- Recall is strict. A correct explanation that does not name the file scores zero for that repository. Some of B's remaining misses are exactly that.
- The hub was tuned on these tasks. Each round fixed a cause seen in their transcripts. The fixes are general — exact search, file listing — but fresh tasks are the honest next test.
- Next-day memory is not measured yet. Hub writes are off in these runs so each one is independent. Whether yesterday's decisions and dead ends reach today's fresh session is the next benchmark.
- Cost is list price for one run. Hub hosting and indexing are not included; on a small server the index costs no tokens to query.