Skip to content
context Benchmarks
Login

Benchmarks

This page lists what ctx has been measured to do. Every figure comes from a result file in bench/results/, and each result shows the date it was measured, the check-in it was measured on and the command that reruns it. Figures measured on the author's own private session archive give counts only, because the sessions themselves are not published. Results that failed the bar set before the run are kept on purpose.

How to read this page

At a glance

Result Outcome What it means
Ranking: full-text search against grep Passed its bar The ranking ctx uses finds about 57% of the labelled documents in its top 10, against 37% for grep. It is a clear win over grep and still misses a lot; no target for the absolute score has been set.
LongMemEval-S, retrieval only No bar ctx's search is level with another tool's published keyword search (two questions apart in 470, which is noise) and well ahead of grep. Both are weakest where evidence is spread over several sessions or depends on dates. Tools that use embeddings report higher figures on this benchmark, but those are their own reports under other scoring, so they are not shown as a comparison.
A small public set of coding sessions Passed its bar ctx clears the check. It says little more than that: the set is 15 invented sessions, and grep does as well. A harder public set of coding sessions does not exist yet.
Coding sessions: finding the session that holds the answer, first run No bar ctx did worse than ranked grep here, 20 against 26 of 30 held-out questions in the session's own terms, and the cause was a fault, not ranking. Questions that name a flag, such as --json, made ctx search stop with an error and return nothing; an agent searching its history for a flag would have hit the same error. The result is kept as it was measured. The next result shows the same questions after the fault was fixed. Paraphrased, both methods fail most of the time.
Coding sessions: finding the session, after search accepted flag names No bar With the fault fixed, ctx finds the right session for 28 of 30 held-out questions in the session's own terms, against grep's 26. ctx alone was right on 3 and grep alone on 1, which is not a difference by the rule set beforehand, so the two are level on this small corpus. Over all 67 questions it is 64 against 52. The change was chosen using only the questions that are not held out, and the held-out ones were run once. Paraphrased questions did not improve: 5 of 30 for ctx and 7 for grep. That is the limit of keyword search, and it is what tools using embeddings should be tested on.
Answering questions about past work Passed its bar Telling the agent at session start that an archive exists is worth about 7 questions in 90 and costs no extra tokens. The difference is borderline by a sign test (p = 0.052), so it is kept as likely but not proven.
Reaching for the archive unprompted Failed its bar Rewording the triggers made no real difference (one question in 23), so the wording was not changed. Fresh agents already search about four times in five without being told.
A reminder when a prompt refers to earlier work Failed its bar The reminder changed nothing because agents already searched every time. The hook exists but is off by default. This test cannot show what happens deep in a long session, where the reminder might matter more.
Finding standing instructions in what a person types No bar A small model finds about five in six standing instructions; cue words find one in six. About a quarter of what it proposes is not a rule, which is why a person accepts or rejects each proposal.
Flagging rules that have gone stale Passed its bar The stronger model never flagged a rule that was still true, so it is the one ctx uses. It finds only a few of the stale rules, because most are never contradicted in conversation; a monthly review covers the rest.
Which kinds of rule go stale No bar Status notes go stale within weeks and rules in a person's own words rarely do, so ctx fades by kind. Fading by age would have silenced about a quarter of rules that were still true.
Holding back a question the archive may answer Failed its bar The idea failed clearly. Three in four firings were irrelevant and one in twelve pointed at a conflicting answer, so the hook was removed before it shipped.
Matching answers to the questions agents asked Passed its bar The record of questions and answers is consistent on a real archive. This checks that answers are attached to the right question, not that they were read correctly word for word.
Hooks and commands on a real archive, machine heavily loaded Failed its bar At the median every hook takes under 50 ms even with the machine running at three times its capacity. The run failed its bar because the first compaction brief took 1.2 s. A second run on a quiet machine gave the same first-run figure, so that cost belongs to the brief and not to the load.
Hooks and commands on a real archive, machine not busy Failed its bar With the machine quiet every hook takes 5 to 35 ms at the median. The compaction brief still failed the bar, at 1.2 s on its first run and about 35 ms after that. The same first-run figure appeared under heavy load, so it is not caused by load: the first brief after a while reads index pages that are no longer in memory. It is inside the 3-second limit, and it is the real cost after a compaction.
Background work No bar Background work costs a few seconds of processor time an hour. The rebuild is a one-off of a few minutes when the index format changes.
Fuzzing and sanitizers No bar Fuzzing found a real bug this week, in a rule that could match across a line break. It did not let a secret through. The failing input is now replayed on every check.

Ranking: full-text search against grep

Whether SQLite FTS5 with BM25 ranking, which ctx search uses, finds the right documents more often than ranked grep, the method an agent falls back on without it.

Measure Result
BM25, recall at 10 0.565
BM25, recall at 50 0.784
BM25, nDCG at 10 0.470
BM25, mean reciprocal rank 0.517
grep, recall at 10 0.372
grep, recall at 50 0.528
grep, nDCG at 10 0.313
grep, mean reciprocal rank 0.348

Measured 2026-11-08; good until 2027-02-06.

bench/run.sh

Result file

LongMemEval-S, retrieval only

A public benchmark of long-term memory in chat assistants. Run retrieval-only, it asks whether a search returns the sessions that hold the evidence for each question. It is chat, not coding work, but it is data anyone can rerun and others publish scores on.

Measure Result
Strict recall at 5 (every evidence session found) 85.1% (400 of 470)
Fractional recall at 5 92.1%
Any hit at 5 96.6% (454 of 470)
Strict, knowledge-update 71 of 72
Strict, multi-session 88 of 121
Strict, single-session-assistant 56 of 56
Strict, single-session-preference 25 of 30
Strict, single-session-user 63 of 64
Strict, temporal-reasoning 97 of 127

Measured 2026-11-12; check-in 9ca411f83487; good until 2027-05-11.

bench/longmemeval.py --data longmemeval_s_cleaned.json

Result file

A small public set of coding sessions

The only public set of coding-session questions found. It is tiny and invented, and plain grep nearly ties on it, so it is a check that nothing is broken and not a measure of how good a tool is.

Measure Result
Questions with every evidence session in the first 5 15 of 15
Recall at 5 1.000
Questions with at least one evidence session in the first 5 15 of 15

Measured 2026-11-12; check-in 9ca411f83487; good until 2027-05-11.

bench/coding_life.py --data DIR

Result file

Coding sessions: finding the session that holds the answer, first run

Each question is asked twice: once in the session's own terms, once paraphrased with none of its distinctive words. Exact terms favour keyword search; paraphrase is where it is weakest.

Measure Result
ctx, session's own terms 20 of 30
grep, session's own terms 26 of 30
ctx, paraphrased 5 of 30
grep, paraphrased 7 of 30
ctx, all questions, own terms and paraphrased 48 and 18 of 67
grep, all questions, own terms and paraphrased 52 and 16 of 67

Measured 2026-11-12; check-in 7150d2056fec; good until 2027-05-11.

bench/shipyard.py --data DIR

Result file

Coding sessions: finding the session, after search accepted flag names

Each question is asked twice: once in the session's own terms, once paraphrased with none of its distinctive words. Exact terms favour keyword search; paraphrase is where it is weakest.

Measure Result
ctx, session's own terms 28 of 30
grep, session's own terms 26 of 30
ctx, paraphrased 5 of 30
grep, paraphrased 7 of 30
ctx, all questions, own terms and paraphrased 64 and 18 of 67
grep, all questions, own terms and paraphrased 52 and 16 of 67

Measured 2026-11-12; check-in 4095a7b2dab0; good until 2027-05-11.

bench/shipyard.py --data DIR

Result file

Agent behaviour

Answering questions about past work

Agents answer questions whose answers exist only in past sessions. Both conditions have ctx and its skill; one also gets the one-line note that the session-start hook adds.

Measure Result
Score with the session-start note 73.5 of 90
Score with the skill alone 66.5 of 90
Questions where the note did better 16 (worse on 6; sign test p = 0.052)
New tokens with the note 7% fewer

Measured 2026-11-10; good until 2027-02-08.

eval/skill_eval.py run --set all --cond C,H && eval/skill_eval.py grade RUN

Result file

Reaching for the archive unprompted

Whether rewording the skill's trigger description around agent situations ("before asking the user", "after a compaction") makes agents search more often. It did not, so the wording was left alone.

Measure Result
Searched the archive, existing wording 18 of 23
Searched the archive, reworded triggers 19 of 23

Measured 2026-11-11; good until 2027-02-09.

eval/skill_eval.py run --set holdout --ask plain --cond C [--skill OLD.md]

Result file

A reminder when a prompt refers to earlier work

ctx recall adds one line telling the agent to search first. Agents already searched every time, so the hook is not installed by default.

Measure Result
Searched the archive, with the reminder 13 of 13
Searched the archive, without it 13 of 13

Measured 2026-11-11; good until 2027-02-09.

eval/skill_eval.py run --set all --only IDS --ask plain --cond C,R

Result file

Rules

Finding standing instructions in what a person types

A classifier proposes rules from a person's own turns; only the person accepts one. Matching cue words such as "always" and "never" is the baseline.

Measure Result
Claude Haiku 84% recall, 76% precision
DeepSeek 80% recall, 60% precision
Cue words 17% recall

Measured 2026-11-10; good until 2027-02-08.

eval/rules_bench.py --classify "CMD"

Result file

Flagging rules that have gone stale

A judge reads a rule beside the person's recent turns and may flag it only with their own words as evidence. Most stale rules are never contradicted in conversation, so recall is low by design; precision is what matters.

Measure Result
Claude Sonnet 3 flagged, 3 truly stale
Claude Haiku 9 flagged, 6 truly stale

Measured 2026-11-10; good until 2027-02-08.

ctx rules judge-with CMD && ctx rules judge

Result file

Which kinds of rule go stale

Whether rules should fade by age or by kind. Fading by age quieted about a quarter of rules that were still true, so ctx fades only status notes, 30 days after their file was last written.

Measure Result
Stale, rules in the person's own words 12%
Stale, corrections 44%
Stale, status notes 83%

Measured 2026-11-10; good until 2027-02-08.

bench/rules/decay.py

Result file

Records

Holding back a question the archive may answer

A hook that stopped an agent's question once when the person seemed to have answered it before. Most questions agents ask are new decisions, so the hook was removed.

Measure Result
Questions it would have held back 18% (133 firings)
Firings where the earlier turns held the answer then given 16%
Firings where they held a conflicting answer 8%
Firings that were irrelevant 76%

Measured 2026-11-11; good until 2027-02-09.

Result file

Matching answers to the questions agents asked

ctx reads each question an agent asked and the person's answer from the archived turns. An answer must belong to exactly one question, including when it arrived after midnight or the session was cut off first.

Measure Result
Answers credited to more than one question 0
Questions left without a status 0

Measured 2026-11-11; good until 2027-02-09.

ctx decisions --all

Result file

Speed

Hooks and commands on a real archive, machine heavily loaded

How long an agent session waits for ctx. Hooks run on every session start, compaction and subagent start, so they are held to a 3-second limit and should take a small fraction of it.

Measure Result
Session start: rules and archive note 17 ms (slowest 41 ms)
Session start: open tickets 16 ms (slowest 25 ms)
After a compaction: the brief 48 ms (slowest 1234 ms)
Subagent start: archive note 10 ms (slowest 12 ms)
Prompt submitted: recall check 8 ms (slowest 9 ms)
Status line 9 ms (slowest 21 ms)
Search, two words 148 ms (slowest 491 ms)
Read a turn with its neighbours 12 ms (slowest 22 ms)
List decisions 443 ms (slowest 6318 ms)
List published pages 552 ms (slowest 1631 ms)

Measured 2026-11-11; check-in 3b1415efd3e0; good until 2027-02-09.

bench/speed.py --runs 7

Result file

Hooks and commands on a real archive, machine not busy

How long an agent session waits for ctx. Hooks run on every session start, compaction and subagent start, so they are held to a 3-second limit and should take a small fraction of it.

Measure Result
Session start: rules and archive note 8 ms (slowest 12 ms)
Session start: open tickets 7 ms (slowest 8 ms)
After a compaction: the brief 35 ms (slowest 1237 ms)
Subagent start: archive note 6 ms (slowest 7 ms)
Prompt submitted: recall check 5 ms (slowest 5 ms)
Status line 5 ms (slowest 5 ms)
Search, two words 99 ms (slowest 339 ms)
Read a turn with its neighbours 7 ms (slowest 8 ms)
List decisions 531 ms (slowest 3740 ms)
List published pages 383 ms (slowest 746 ms)

Measured 2026-11-12; check-in 7150d2056fec; good until 2027-02-10.

bench/speed.py --runs 7

Result file

Background work

What ctx does away from the session: the hourly scan, the judge's pass over rules, and the one-off rebuild when the index format changes.

Measure Result
Hourly scan, processor time about 2.5 s (20 to 32 s elapsed on a heavily loaded machine)
Choosing rules to judge 0.12 s (about 140 s before an index was added)
One-off index rebuild 101 to 212 s

Measured 2026-11-11; good until 2027-02-09.

time ctx scan

Result file

Safety

Fuzzing and sanitizers

Redaction must never crash, must change nothing when run twice, and must leave no secret that a rule recognizes. Every input that ever broke one of these is kept as a seed and replayed on each check.

Measure Result
Bugs found by fuzzing this week 1 (a token rule matched across a line break, so redacting twice differed from once; fixed)
Saved inputs replayed for redaction 6

Measured 2026-11-11; good until 2027-02-09.

make check

Result file