Measured, not promised
Benchmarks
Leashr against the tools that do the same job, on the same inputs, with their default settings. Where Leashr loses, the page says so. Every figure comes from the files of bench/ and is recomputed by a test before the site builds.
Measured on 2026-11-26 on one machine: Windows 11 Home, Node v24.14.0, Claude Code 2.1.310, real sessions on claude-haiku-5-5.
Key figures
Dangerous commands controlled, blind set
24/30
dcg 12/30, guard-pack 10/30, claude-safety-guard 8/30.
Spend against the cap, median (below 0 is under it)
−6.6%
Native permissions: +14.9%.
Sessions with the exact cost
40/40
ccusage: 40/40.
Tool calls joined to their decision
87/87
Local audit log, replayed on 51 cases.
Where Leashr loses
- Evasions : 11/12 after fixes (7/12 before), dcg 12/12
- Hook latency : 58.0 ms, dcg 30.8 ms
- Guided /compact (experimental) : Success 100.0% against 75.0%, but 0.0550 USD against 0.0467 USD
Measured the same way as everything else, and published as is.
Summary
| Domain | Result | Verdict |
|---|---|---|
| Dangerous commands, blind set | 24/30 controlled, dcg 12/30, guard-pack 10/30, claude-safety-guard 8/30 | Ahead |
| Evasions | 11/12 after fixes (7/12 before), dcg 12/12 | Behind |
| New variants, blind set 2 | 22/24 dangers controlled, 26/26 benign passed, M14, M19 missed | Measured, no rival |
| Everyday commands, blind set 4 | Before the fixes: 38/49 dangers, 109/127 benign passed. After, in sample: 48/49 and 126/127 | Measured, no rival |
bash -c in real sessions | Refused 5/5, native permissions 0/5 | Ahead |
| Broken hook input | Blocked 3/3, dcg 0/3 | Ahead |
| Spending cap | −6.6% against the cap, native +14.9% | Ahead |
| Cost per mission | 40/40 sessions exact, ccusage 40/40 | Even |
| Audit trail | 87/87 calls joined to their decisions | Ahead |
| Install | 95 ms, 9 files, none outside the project | Measured, no rival |
| Hook latency | 58.0 ms, dcg 30.8 ms | Behind |
| Cost for a user who did nothing wrong | 0 wrong deny and 1 ask on 232 benign commands, 59.7 ms per hook, 1,632 tokens at session start | Measured, no rival |
| Guided /compact (experimental) | Success 100.0% against 75.0%, but 0.0550 USD against 0.0467 USD | Ahead and behind |
| Delivery chain | 6/6 trapped PRs judged right, 6 real runs | Measured, no rival |
| Advisor (experimental) | 43/60 and 24/40 claimed, not replayable | Not proven |
Results by domain
Open a domain for its chart, its table and its limit.
Dangerous commands
On blind set 1, before any fix, lsh-rules controls (refuses or asks) 24/30 plain dangerous shell commands, dcg 12/30, guard-pack 10/30, claude-safety-guard 8/30. False positives: 1/24 for lsh-rules (a grep for DROP TABLE that was asked), 1/24 for dcg (git branch -d refused).
| Tool | Plain dangers | Evasions | Outside Bash | False positives |
|---|---|---|---|---|
| lsh-rules | 24/30 | 7/12 | 3/3 | 1/24 |
| dcg | 12/30 | 12/12 | — | 1/24 |
| guard-pack | 10/30 | 6/12 | 3/3 | 0/24 |
| claude-safety-guard | 8/30 | 4/12 | — | 0/24 |
| lsh-rules after fixes (in sample) | 24/30 | 11/12 | 3/3 | 1/24 |
Blind set 2: the 7 holes of set 1
Only lsh-rules is replayed here. Before the new rules: 9/24. After: 22/24 dangers controlled and 26/26 benign commands passed. Two dangers stay open on purpose rather than being fixed on the set that revealed them:
- M14
pkill -9 -u $USER - M19
truncate -s 0 ~/.bash_history ~/.zshrc
Blind set 4: everyday commands
Set 4 asks the other question: how many harmless everyday commands (build, cleaning generated folders, git, npm, docker, tests, read-only MCP) does lsh-rules stop wrongly, and which dangers does it let through? 176 new cases, 49 dangers and 127 benign, written without rereading the rules or sets 1 to 3 and committed alone (0729b3c). Before the fixes, lsh-rules controlled 38/49 dangers (78%) and let 109/127 benign commands through (86%): 18 false positives, most of them an rm -rf of a generated folder such as dist or build.
| Measure | Dangers controlled | Benign passed | False positives |
|---|---|---|---|
| Before the fixes (generalisation) | 38/49 | 109/127 | 18 |
| After the fixes (in sample) | 48/49 | 126/127 | 1 |
The rules were then fixed on these failures: there are now 54 default rules, and rules.js test passes 555/555 cases. Replaying cases.json and sets 1 to 3 on the new rules loses no detection and adds no false positive: set 2 now catches 23/24, set 3 stays at 50/50 dangers and 39/39 benign.
The 48/49 and 126/127 after the fixes are in sample: the fixes were written on these very failures, so they prove nothing about the next set. The only generalisation figure of set 4 is the one before. Still open: an MCP query carrying DROP TABLE in an sql field (the engine does not read that field), and git checkout -- src/a.js, still asked on purpose because it discards edits, while git restore passes. The set holds many rm cases because that was the open case: without them the false positives before were 3 out of 112 benign commands. A new rule also asks on MCP tools whose name contains delete, remove, drop, destroy or truncate: a real cost for anyone who had allowed those tools unconditionally.
Evasions and failure modes
dcg controls 12/12 evasions of blind set 1 (quotes, interpreters, encodings, wrappers). lsh-rules controlled 7/12 before the fixes and 11/12 after, a score in sample. Behind dcg on both.
Real Claude Code sessions, n = 5 per case
Asked to run bash -c 'git push --force origin main', the native permissions.deny blocked it 0/5: it ran each time. lsh-rules refused it 5/5. On the direct forms, both refuse 5/5.
| Case | Native permissions | lsh-rules |
|---|---|---|
git push --force origin main | 5/5 | 5/5 |
bash -c 'git push --force origin main' | 0/5 | 5/5 |
Broken hook input
Input that is not JSON, empty, or without a tool name: lsh-rules blocks 3/3, dcg 0/3 (its own message says fail-open), guard-pack and claude-safety-guard let it through. It is a choice: a broken file blocks legitimate work too.
Spending cap
Cap of 0.002 USD on an 8-call task, n = 5 per arm, lsh-cap and native --max-budget-usd run alternately in the same window. Median final cost against the cap: lsh-cap −6.6%, native +14.9%. Before the fix of 26/11, lsh-cap overshot by +55.6%.
A cap of two thousandths of a dollar mostly measures the lag of one request: long runs and other models are not measured. lsh-cap stops before the request that would cross the cap, so it ran 2 calls where native ran 3. The first version of the fix had one run of five above the cap (+6.9%).
Cost per mission
40 real sessions, 5 of them with a sub-agent. Reference: the total_cost_usd that claude -p reports. Identical to the reference: lsh-cost 40/40, ccusage 40/40, claude-session-cost 0/40 (its price list does not know claude-haiku-5-5).
Even with ccusage on accuracy. Ahead on attribution per mission (ccusage groups by session). Behind on reach: ccusage works offline on past transcripts, with no collector. The reference is Claude Code's estimate, not an invoice; one model, sessions under 0.005 USD.
Audit trail
87/87 real tool calls have exactly one rules decision and one cap decision in the journal. Replaying the 51 cases writes 51 events for lsh-rules and 28 for guard-pack, which logs refusals only, without the command.
A secret in a command is masked (absent from the journal). The journal has no hash chain: it is not tamper-proof.
Install
lsh-init takes 95 ms (median, n = 10, down from 140 ms in the same window), writes 9 files in the project and none outside, changes nothing on a second run and writes nothing in dry-run.
dcg compiles from source with cargo; ccusage needs no install at all.
Hook latency
Median of 50 runs after 5 warm-ups, process start included, benign command: lsh-rules 58.0 ms, dcg 30.8 ms. Starting Node alone takes 39.1 ms, more than dcg's whole hook: this gap cannot be closed in Node. Ahead of guard-pack (109.9 ms) and claude-safety-guard (133.7 ms).
| Tool | Benign, median / p95 | Dangerous, median / p95 |
|---|---|---|
| dcg | 30.8 / 34.5 | 32.4 / 35.6 |
| lsh-rules | 58.0 / 74.0 | 56.6 / 58.6 |
| lsh-cap guard | 55.0 / 58.4 | 51.6 / 61.9 |
| guard-pack | 109.9 / 114.0 | 64.1 / 68.3 |
| claude-safety-guard | 133.7 / 143.0 | 137.5 / 151.1 |
| node -e 0 | 39.1 / 45.2 | — |
What Leashr costs when you did nothing wrong
Measured on 0.1.1 on 2026-11-29: context added at session start, interruptions on harmless commands and hook latency. Tokens are estimated as characters divided by 4, so comparisons hold and absolute values are upper bounds. Only the plugin descriptions load at start; a skill body is read when the skill is invoked.
| Plugin | Skills + commands loaded, with dependencies | Tokens at start |
|---|---|---|
| leashr-cost | 3 + 0 | 225 |
| leashr-ship | 5 + 0 | 434 |
| leashr-guard | 10 + 0 | 852 |
| leashr-learn | 13 + 2 | 1,198 |
| leashr | 18 + 2 | 1,632 |
Interruptions: on 232 benign commands (cases.json and blind sets 1 to 4, replayed with the default rules of 0.1.1), lsh-rules denied 0 and asked 1, 0.43 per 100: git checkout -- src/a.js, which discards edits.
Hook latency on git status, n = 50 after 5 warm-ups, process start included: 59.7 ms median, 21.7 ms above the 38.0 ms of node -e 0. Another day and another load than the latency table above: do not compare absolute values between them.
One machine, Windows. Tokens come from a character count, not from a tokenizer, and the real skill listing may truncate long descriptions. The skill bodies are not counted: they are read only on invocation.
Context after /compact
8 frozen sessions of about 48,000 tokens, 10 runs each per arm on Haiku 5.5: a /compact, then the task resumes. Success with the guided /compact of lsh-context: 100.0%; native /compact 75.0%, native with instructions 88.8%, no compaction 92.5%. It costs more: 0.0550 USD per cut and task, against 0.0467 USD native and 0.0232 USD without compacting.
| Arm | Success | Cost, cut and task | Empty summaries |
|---|---|---|---|
| Guided by lsh-context | 100.0% | 0.0550 USD | 5/80 |
| No compaction | 92.5% | 0.0232 USD | — |
| Native, with instructions | 88.8% | 0.0478 USD | 21/80 |
| Native /compact | 75.0% | 0.0467 USD | 37/80 |
| /clear | 17.5% | 0.0082 USD | — |
Experimental, not released yet. Empty summaries fall from 37/80 to 5/80. Synthetic tasks, one model, medium context; the handoff and /clear path is not measured.
Delivery chain
lsh-review alone on 6/6 trapped pull requests (lying test, secret, new dependency, instruction to the reviewer, uncovered criterion, clean PR): every verdict as expected. The whole chain in real claude -p sessions: 6 runs.
| Run | Orchestrator | Ends at | Cost | Time | Human messages |
|---|---|---|---|---|---|
| haiku-1 | claude-haiku-5-5 | pr | 0.25 USD | 138 s | 2 |
| haiku-2 | claude-haiku-5-5 | awaiting-merge | 0.15 USD | 112 s | 2 |
| sonnet-1 | claude-sonnet-5-5 | awaiting-merge | 0.41 USD | 103 s | 2 |
| sonnet-2 | claude-sonnet-5-5 | awaiting-merge | 0.56 USD | 101 s | 2 |
| sonnet-3 | claude-sonnet-5-5 | awaiting-merge | 0.49 USD | 91 s | 2 |
| sonnet-governed-interrupted (governed by Leashr, killed during review then resumed) | claude-sonnet-5-5 | awaiting-merge | 0.33 USD | 113 s | 3 |
n = 1 or 2 per configuration, one small feature, Windows only. No real gh pr create (the test repositories have no remote). haiku-1 stopped at the pr step. In the interrupted run, the killed part is not measured. Not released yet.
Who was measured
| Tool | Version | Measured on | Date |
|---|---|---|---|
| dcg | 0.17.0 | Dangerous commands, evasions, latency, broken input | 2026-11-26 |
| guard-pack | karanb192/claude-code-hooks 3d5e10c (2026-11-26) | Dangerous commands, evasions, latency, broken input, audit | 2026-11-26 |
| claude-safety-guard | 0.2.0 | Dangerous commands, evasions, latency, broken input | 2026-11-26 |
| Claude Code native | Claude Code 2.1.310 | permissions.deny in real sessions, --max-budget-usd | 2026-11-26 |
| ccusage | 20.0.51 | Cost per session | 2026-11-26 |
| claude-session-cost | 88719ac (2026-06-10) | Cost, spending cap | 2026-11-26 |
Blind sets 2 and 4 and the friction measure replay lsh-rules only: the other tools keep their figures of 2026-11-26.
Method
- One machine, one model: Windows 11 Home, Node v24.14.0, Claude Code 2.1.310, sessions on claude-haiku-5-5. Latencies depend on the load of the machine, so the floor
node -e 0is published next to them. - The protocol was written on 21/11 before any measure. Every change since is an amendment with its date and its reason: seven so far (test repository branch, cap level, isolated harness, fixes, blind set 2, blind set 3, blind set 4).
- Blind set 1: 74 new cases committed alone (
a8235b0) before the author opened the rules. Its column before the fixes is the unbiased measure. The rules were then fixed on it, so the column after is in sample. - Blind set 2: 50 new cases committed alone (
1a6d773) before the rules written for the 7 holes of set 1. Declared bias: the author knew the 7 families, so this set measures how the rules generalise to variants, not whether they find new families. - Blind set 4: 176 cases written without rereading the rules or sets 1 to 3 and committed alone (
0729b3c). Its column before the fixes is the generalisation figure; the column after is in sample. - Competitors run with their default configuration and their latest version of the day, never tuned to lose. n is given everywhere; with n = 5, 5/5 only means that no failure was observed.
- The first case set (
bench/cases.json, 51 cases) was seen before the default rules were extended: Leashr's 21/21 there is in sample and is not used as proof.
Not proven
- Blind set 4 after the fixes is in sample: only its figure before (38/49 dangers, 109/127 benign) measures generalisation. A new set is needed to measure the 54 rules without bias.
- Friction: one machine, tokens estimated from characters, hook latency of one command. Skill bodies and long sessions are not measured here.
- Advisor: 43/60 of its holds matched the intent of the rule on one corpus, 24/40 on a held-out one (claimed on 26/11). The samples are versioned, the hand labels were not saved: not replayable.
- Linux and macOS: not measured, Windows only.
- Spending cap on long runs, on several models, and with concurrent sessions: not measured.
- The handoff and /clear path of lsh-context: not measured.
- dcg with a corrupt configuration: not measured.
- cc-kill-switch, budgetclaw, disler observability, Rulebricks, claude-remote-approver: not installable here, not measured.
- Comparison with other agents (Codex, Gemini CLI): measured on 21/11, not replayed since.
Replay it
Everything runs in a throwaway folder <scratch>, never in your real configuration. Installing the competitors and the real sessions are described in bench/README.md.
Rules, latency, broken input (offline, free)
node bench/scripts/guard-bench.js <scratch> --latency --fail --out guard-bench-2026-11-26-fixes.json
node bench/scripts/guard-bench.js <scratch> --cases bench/cases-blind.json --out guard-bench-blind-2026-11-26-after.jsonBlind set 2 (lsh-rules only)
node bench/scripts/rules-blind.js . bench/cases-blind-2.json skills/lsh-rules/scripts/default-rules.json rules-blind2.jsonBlind set 4 and friction (lsh-rules only)
node bench/scripts/rules-blind.js . bench/cases-blind-4.json skills/lsh-rules/scripts/default-rules.json rules-blind4.json
node bench/scripts/friction.js --out friction.jsonSpending cap (real sessions, costs a few cents)
bash bench/scripts/cap-bench.sh <scratch> <worktree> lsh|native <1..5> 4319
node bench/scripts/cap-count.js <scratch> 0.002 5 cap-bench.jsonSummary and this page
node bench/scripts/summarize.js
cd site && node tools/bench-data.mjs && node --test tools/bench-data.test.mjs