---
title: "Study 1: AI coding agent token cost, round by round · Cork"
description: "Measured token cost, wall-clock time and accuracy for AI coding agents on one repo: 1,183K tokens per agent searching by hand versus 194K with Cork, across 300-module repos, ten-agent runs and four concurrent agents. Method and raw numbers included."
canonical: "https://corkcli.com/benchmarks/study-1-shared-context"
last_updated: "2026-09-20"
---

# What AI coding agents actually cost per task

Every number here was replayed from recorded agent transcripts, not estimated. Same task, same model, same 300-module repository. The only thing that changes is whether the agent had to discover the codebase itself, or was handed exact facts before it asked.

6.2×
:   fewer tokens per agent, Round 11, same run

100%
:   tasks landed correctly, every round

10 → 0
:   edits thrown away when four agents share one repo

21/21
:   features correct against the live server

## Two ways to count

By Graphify's arithmetic

621×

1,182,646 tokens an agent spent discovering the repository on its own, over the 1,904 tokens of facts a briefing hands it instead. Raw over compact, per query, the way the 71.5× is computed.

vs

What you are billed

6.2×

Round 11: the whole session, per agent, ten agents each way on the discovery task, same model, same run, every one correct: 1,211K tokens per agent without Cork, 196K with it.

## Token cost per agent, same task

An agent asked to change a function signature and fix every caller. Without shared context it searches the tree, reads what it finds, and pays for all of it on every later message. With context delivered before it asks, the searching disappears. Every agent in every round landed the change correctly.

## What happens as more agents join

Ten agents, one repository, arriving in turn on a task where the answer has to be found before it can be applied. The first agent does the finding and saves the result. The rest replay it in fifteen to twenty-six seconds each, so the running cost per agent falls and flattens. Without shared context there is no trend at all, because every agent starts over.

## Four agents editing one repo at the same time

Subagents already run in parallel. Staying out of each other's way is the hard part. Four agents with overlapping blast radii finish in about the same wall time either way. The difference is how much of that work survives: a rejected edit is that agent's turn spent twice.

| Condition | Wall clock | Agent time | Edits thrown away |
| --- | --- | --- | --- |
| Four plain subagents | 145s | 9m 11s | 10 |
| Four agents on Cork | 164s | 8m 36s | 0 |

Run the same ten tasks one after another instead, and the sequential total falls from **19 minutes 46 seconds** of agent time to **5 minutes 35 seconds** — not because anything runs in parallel, but because nine of the ten agents stop rediscovering the repository.

## How often the briefing is right

Cheap context is worthless if it is the wrong context. Cork decides which words in a prompt name real code, then briefs the modules those touch. Measured against an index of a real repository over **312 recorded prompts**, precision went from 0.536 to 0.652 by refusing to treat a capitalized English word as an identifier — while still recognising the snake\_case names a codebase genuinely uses.

In live runs the hooks also grade themselves: across seven agents, every briefed file an agent opened was one it went on to edit, and none was opened and abandoned.

## Feature accuracy against the live server

A probe repository whose dependency graph is known in advance, checked answer by answer against ground truth on the production server — including a caller reachable only through a renamed import, which is where naive symbol search fails.

| Area | Checked | Correct |
| --- | --- | --- |
| Parsing | Exact signatures, module and symbol docstrings | 3/3 |
| Blast radius | Direct callers, both second hops, one reached only through an import alias | 3/3 |
| Negative facts | Where a symbol is not called, and symbols nothing calls at all | 2/2 |
| Briefing | Correct modules, and the coverage line reporting a complete list | 1/1 |
| Collisions | Own session passes the gate, another session is refused on a hot file | 2/2 |
| Live deltas | One session's signature change reaches the other mid-task | 1/1 |
| Verified marks | Stamped by the repo's own check, carried into the next briefing | 1/1 |
| Savings ledger | Reads avoided, priced at the model's cache-read rate | 2/2 |
| Recipes | Saved, offered to the next agent naming that symbol, callers exact | 3/3 |
| Graph | Changed symbol flagged, ripple marked by distance, conventions inferred | 3/3 |

## Method, and what these numbers do not say

**How tokens are counted.** Input, cache writes, cache reads and output, summed once per assistant message, straight from the usage the provider reports. Cache reads dominate and are billed at a fraction of input, so the dollar figures are far smaller than the raw counts suggest.

**How correctness is judged.** Not by the agent's own summary. The repository's check runs against the final tree, and the required signature must be present in every target file.

**Adding agents raises the total.** Each one pays its own floor. What falls is the cost per agent and the work each has to redo; splitting a task across ten agents never beats one agent doing it alone on tokens, only on wall clock.

**Why we do not lead with 621×.** Divide the tokens an unaided agent burned discovering this repository by the tokens of one briefing and you get a figure in the hundreds, computed exactly as Graphify computes its 71.5×: raw over compact, per query. It is true and it is not a bill. A session is mostly the work itself, so the per-agent number is the one that predicts your invoice.

**Where the gains are not.** A compile-and-fix loop needs the compiler between every step, and no memory layer shortens that. Shared context helps work that is bound by knowing, not by doing.

[Read the docs](https://corkcli.com/docs)[Multiple agents, one codebase →](https://corkcli.com/guides/multiple-ai-coding-agents-one-codebase)

This page in HTML: https://corkcli.com/benchmarks/study-1-shared-context
