Reading CLEO: Does a 3k-Line Harness Really Match Claude Code?
Contents · 6
Damien · November 2026
This week I read Optimize the Harness, Not the Model, a CIKM ‘26 short paper by four authors from Dream Security.
The pitch is eye-catching: hold a self-hostable model fixed, optimize only the harness wrapping it, and hit an 83.8% pass rate in roughly 3k lines of code — just 1.2 percentage points behind the Claude Code SDK, with two orders of magnitude less code.
My takeaway after reading it: two ideas in the method are worth borrowing, yet the evaluation table cannot support its headline claims. Not a single difference in that table can be distinguished from noise.
1. What the Paper Does
The domain is investigative analysis for government intelligence teams. A typical case contains roughly 8,000 files across up to 7 formats, mixed with misleading and contradictory evidence. Under strict security and cost constraints, these teams usually rely on self-hosted models, and every new tool and every line of harness code has to pass security review. So the authors want more than high accuracy — they also want the harness kept small.
Their method, CLEO, is an automated “propose, test, keep” loop:
flowchart TD
H0["Initial harness<br/>ReAct loop + ls / read / grep / sandboxed Python"] --> P
P["Opus 4.8 proposes one change"] --> E
E["Run 44 tasks with GLM-5.1<br/>32 fixed + 12 freshly sampled per round<br/>LLM judge"] --> G1{"Gain > ε?"}
G1 -- No --> R["Revert"]
G1 -- Yes --> G2{"Opus 4.8 check:<br/>general, auditable, minimal?"}
G2 -- No --> R
G2 -- Yes --> K["Keep"]
R --> A["Analyze errors<br/>occasionally swap to OOD pool"]
K --> A
A --> P
A -- Stop when no justified gain --> F["Final harness, ~3k lines"]
F --> T["Evaluate on 240 held-out tasks<br/>never seen by the loop"]
The authors point to two contributions. First, a justification gate: an edit must not only raise the score, it must also be general, auditable, and minimal. Second, a bottom-up build: start from a nearly empty harness and add components only when evaluation shows they are needed.
There is a small example in the paper I really liked. Error analysis showed the judge was penalizing answers that lacked supporting citations, so the loop added a cite() tool. In practice the agent rarely called it, and the change was reverted.
2. What the Table Actually Shows
All four rows run GLM-5.1 on 240 held-out tasks, graded by Opus 4.8. I computed the intervals in the rightmost column with the Wilson method, treating each row as an independent sample.
| Harness | Lines of Code | Pass Rate | Latency | 95% CI |
|---|---|---|---|---|
| Claude Code SDK (generic prompt) | ~512k | 85.0% | 76s | 79.9–89.0% |
| PI #1 (generic prompt) | ~75k | 80.8% | 126s | 75.4–85.3% |
| PI #2 (CLEO’s prompt) | ~75k | 83.8% | 121s | 78.6–87.9% |
| CLEO | ~3k | 83.8% | 114s | 78.6–87.9% |
All four intervals overlap. Because the paper doesn’t release per-task scores, we can’t run a paired test — paired intervals could be tighter. On the published numbers alone, though, this table cannot tell the systems apart.
The authors are upfront about the Claude Code row: a gap of roughly 3 tasks, which they explicitly frame as “practical parity” rather than a ranking. Still, “no difference detected” and “equally good” are two different claims.
On several other claims, I don’t think the evidence is there:
- “Best trade-off” / sweet spot: CLEO beats PI #1 by 3 points — an unpaired z-score below 0.9 — while running 50% slower than Claude Code. That conclusion leans almost entirely on line count.
- “Two orders of magnitude smaller”: The authors admit in a footnote that the 512k figure cannot be verified, and they don’t state what was counted. Compared against PI, the ratio is 25x, or about 1.4 orders of magnitude.
- “Two orders of magnitude smaller capability surface”: Never measured in the paper. CLEO includes sandboxed Python, which on its own exposes a very wide capability surface.
- “Small enough to pass security review”: No actual security review outcomes are reported.
- “Bottom-up works better”: Backed only by a passing remark that top-down pruning barely shrank the harness, with no numbers given.
The authors do state one important limitation clearly: the judge was only spot-checked by domain experts and product managers rather than systematically validated. That candor deserves credit.
3. The Table Looks More Like a Prompt Story
The most revealing part of the table is the two PI rows.
Changing nothing except the prompt moves PI from 80.8% to 83.8% — the exact same score as CLEO. Put differently, most of CLEO’s gain may come from the prompt rather than the harness code.
The paper doesn’t test “Claude Code + CLEO prompt” or “CLEO + generic prompt,” so there is no way to disentangle prompt effects from harness effects. And that 3-point gap isn’t statistically significant on its own either — it’s only a clue.
AHE points the other way: its ablations attribute the gains to tools, middleware, and long-term memory rather than the system prompt. Since the two papers tackle different tasks — coding versus investigative analysis — neither settles the question generally.
If you want a citation showing that harnesses can be optimized automatically, I would cite AHE and Meta-Harness first. Both evaluate on the public TerminalBench-2 benchmark. CLEO’s dataset is private and its code isn’t released; what makes CLEO distinctive is baking compactness and auditability into the optimization criteria.
4. How Noisy the Optimization Loop Is
Held-out evaluation uses 240 tasks, whereas each round inside the loop runs only 44 — making a single task worth 2.3 percentage points. A single run has a standard error around 5.5 points, and the unpaired difference between two versions has a standard error around 7.8 points. Keeping 32 tasks fixed cancels part of that noise, yet the paper never reports ε, so we can’t tell where the threshold sits relative to the noise floor. Total iterations and compute cost aren’t reported either.
Three more details I would press on:
The incumbent score may be stale. Twelve tasks are freshly drawn every round, yet in the pseudocode the current best score a updates only when an edit is accepted, with no mention of re-evaluating on the new sample. Without re-evaluation, one lucky draw inflates the bar for subsequent rounds.
The optimization pool is small. Holding out 240 tasks out of “300+” leaves roughly 60-some tasks for optimization. If the 32 fixed tasks come from that same pool, the 12 “freshly sampled” tasks per round will start repeating quickly. That arithmetic is mine — the paper only states “300+”.
The model reviews itself. Both proposing edits and judging whether an edit is justified are done by the same supervisor, Opus 4.8 — lines 4 and 6 of the algorithm say so explicitly. There is no ablation without the justification gate and no report of how many proposals it filtered out. The authors call it a core contribution, yet its impact goes unverified.
Also worth noting: only runtime inference is self-hosted. Optimization relies on a frontier model as supervisor, so if a customer environment cannot reach external frontier models, re-optimizing on site won’t be straightforward.
5. Two Ideas Worth Borrowing
Drop tools the agent rarely calls. That comes straight from the cite() anecdote. A tool the agent seldom invokes only widens the capability surface and adds review overhead. You don’t need an optimization experiment to apply that rule, and it pays off immediately for agents that touch real production systems.
Test harness and prompt as two separate factors. If the prompt changes whenever the harness changes, you can’t tell which one earned the gain. This paper only fills in a few cells of that matrix, even though the setup points in the right direction. Fill out all the cells and include a minimal reference harness (ls / read / grep / Python), and it becomes clear what all the extra code actually buys.
Closing
The paper is worth reading, though I wouldn’t cite its numbers as hard evidence. Right now, “3k lines matches Claude Code” really only says “3k lines wasn’t measured to trail clearly behind.” Proving the stronger version takes public benchmarks, per-task outputs, and a full set of controls.