kadence
Proof

What an answer costs an AI agent

Four repositories built through the real CLI at 10, 50, 200 and 1,000 tasks — and what each path costs to read.

The conflict study asked whether the problem exists. This one asks what the answer costs: if an AI agent has to read kadence to know what happened, how much of its context does that take, and does it grow with the project?

Four repositories were built through the real CLI at 10, 50, 200 and 1,000 tasks, each with movement, comments and logged hours. Then the bytes were measured along every path an agent can take.

Bytes, not tokens

No tokenizer runs offline, and adding one would be a dependency for a measurement. Where a token figure helps below it is bytes ÷ 3.5 — the usual ratio for punctuation-heavy JSON — and marked as an estimate. Every comparison here is a ratio, so the divisor cancels.

The measurement

TasksEventstask show --jsonboard --jsonWhole journalstate.json
10249487,8985,4639,004
5011594839,78526,47344,064
200458948160,217105,792176,396
1,0002,285948803,055528,655882,703

All figures in bytes. Fixed costs, independent of project size: the kadence section in AGENTS.md / CLAUDE.md is 591 bytes, .kadence/README.md is 1,887, and kadence schema --json is under 4 KB.

The answer is a constant; everything else is not

task show --json returns 948 bytes whether the project holds 10 tasks or 1,000. The journal behind it grows from 5 KB to 528 KB — 557× the size of the answer it produces.

The point is not the multiplier at any one size. It is the shape: the cost of asking does not grow with the history that makes the answer worth having.

The AI agent cannot bypass the CLI, by construction

An agent knows a task as KAD-3, because that is what humans write in commits and pull requests. Searching the journal for it returns nothing — identity is the ULID, and KAD-N is derived while folding, never stored. So an agent holding a human's reference has two options: fold the whole journal itself, or make one call. There is no third.

That is not an optimisation we added. It falls out of a decision made for correctness.

Where the measurement corrected us

Two findings went against what we had written down.

The MCP token argument does not apply to us. The industry numbers are real — GitHub's MCP server injects ~55,000 tokens of tool definitions before a session starts — and we had cited them as validating our CLI-first decision. Then we measured what our MCP wrapper would cost: 13 tools generated from our own contract, 3,058 bytes of ambient context against 591 bytes for the instruction section. A difference of about 700 tokens a session. kadence is thirteen short commands, not a server exposing dozens; borrowing someone else's evidence would have been dishonest. The reasons to keep MCP optional are the ones that survive: it works for agents with no MCP client at all, and the core keeps zero runtime dependencies.

board --json did not scale, and that was ours to fix. At 1,000 tasks it returned 803 KB — larger than the journal it was folded from, because every task was emitted in full in every column. That is past the context window of most models, for the exact audience the flag exists for. Fixed in 0.2.1 with --fields: on a 200-task board, 130,799 bytes down to 11,015.

The bug no test had caught

Every --json response above 128 KiB was truncated mid-string when stdout was a pipe — which is exactly how an agent reads it. process.exit() does not wait for an asynchronous write to drain, and a pipe write is asynchronous while a file write is not. Redirected to a file the same command produced valid JSON; piped, it produced 131,072 bytes and a parse error.

The suite had 418 passing tests, and every fixture in it was small. It is fixed, with two regression tests that build a response past the buffer and parse it.

What this probe did not answer

Whether any of it matters to a user. It measures what an answer costs, not whether anyone wants the answer. A cheap answer to a question nobody asks is worth nothing — that is the interview round we have still not run.

Raw data

The full write-up is in the product repository: probe-c-agent-cost.md.

On this page