Cortex Benchmarks

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.

0.90recall on cross-repo questions with Cortex — 0.26 from the repository alone
77%of the cost of putting every repository on disk, at the same recall — 0.90 against 0.88
7 reposone real product, private code the model has never seen
120headless agent runs, each in a fresh worktree

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.

A

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”

AA

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”

B

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

  1. 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.

  2. 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
  3. 03

    Scored from the transcript, not by eye

    The run's stream-json transcript is kept. Cost and turns come from its result event; tool calls are counted by kind — hub calls, file searches (the Grep tool plus any rg, grep, find or git grep in 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.

SetupRunsRecallCost / runTurnsMinutesSearches
Latest run · 5 repetitions
B · one repo + Cortexhub at v1.3.11150.90$0.3421.91.12.5
AA · all seven repos on disk150.88$0.4422.11.716.5
Pilot · 3 repetitions
A · the repository alone90.26$0.2410.21.07.1
AA · all seven repos on disk90.95$0.4621.32.016.2
B · one repo + Cortexbefore the changes below90.59$0.2614.31.24.6

Recall, latest of each

Share of answer groups whose file the agent named.

A · one repo0.26
AA · all repos0.88
B · + Cortex0.90
77%of AA's cost per run, at the same recall
65%of AA's wall time per run

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.

RoundWhat changed in the hubRunsRecallCost / run
BaselineRanked 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”.90.59$0.26
#95Reword hints judged within one session and one search scope.Stopped nudging the agent off a search that was in fact new.70.64—
#96Exact 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.90.82$0.32
#97A 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.90.86$0.32
LatestSame hub, more repetitions.150.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.

SetupRunsRight filesJudge (0–2)Cost / runTurnsSearches
A · the repository alone181.001.50$0.2114.29.4
B · one repo + Cortex181.001.67$0.2012.87.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.

Moder@1r@3r@10MRR
vector0.5330.6671.0000.656
BM250.2670.6671.0000.530
hybrid (RRF) — shipped0.6000.7331.0000.703
vector + LLM rerankno 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.

96.0%R@5 — the right session in the top five
97.8%R@10
0.685MRR on memory search, hybrid (vector alone: 0.601)
$0per run: embeddings are computed in process

Limits

Read these before quoting a number

  1. Small n. Three find tasks and six fix tasks on one product. The numbers are evidence of direction, not a leaderboard.
  2. One model, one agent. Claude Sonnet through Claude Code. Other agents read the same hooks and tools, but are not measured here.
  3. The repositories are private. The agent runs cannot be reproduced outside the team; the retrieval benchmarks can.
  4. 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.
  5. 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.
  6. 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.
  7. 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.