Where do an AI agent's tokens go?
An AI agent mostly pays for what it re-reads on every turn. How covey keeps that prefix small with COVEY_RUNTIME_TOOLS and shows which runs cost the most.
An agent picks up a ticket. It reads a few files, calls two tools and ends by posting a ten-line comment. The bill for that run shows a figure with no visible relation to those ten lines, and explaining it means knowing what the model read along the way.
On 28 April 2026 the Hacker News user Zephyr0x described a bill of $37,901.73 for Claude Opus, run up by an ordinary coding-agent workflow. Roughly $35.6k of it was uncached input, which the post's title puts down to "a simple prompt caching miss"; output came to about $698. In November 2025 harsharanga, also on Hacker News, had built an agent from scratch (no framework, no prompt caching, six tools) to measure token growth. In that measurement the number of conversation turns drove usage harder than the number of tools.
You pay for reading, again on every turn
covey's operations documentation describes the same pattern on its own platform. On each step the system prompt with all tool schemas, the target-system docs and the transcript so far go into the model again. On a live instance over 24 hours that came to 3.2 million output tokens against 112 million cached input tokens.
A long run gets disproportionately expensive as a result, because the prefix is re-read per turn and the transcript grows on top of it. In one measured run, turn 1 read 44,000 tokens and turn 70 read 155,000. That 70-turn run is the example the rest of this post keeps coming back to.
A higher turn limit stretches that curve. Per the docs, raising max_turns removes aborted runs but makes the runs longer instead of cheaper.
The tool scope is part of the prefix on every turn
The docs call the static prefix the biggest single item, since it is paid for on every turn. COVEY_RUNTIME_TOOLS sets it: a comma-separated list of a run's built-in tools. Left empty, the default applies.
The Claude Code adapter passes that list twice: as --allowedTools and as --tools.
The two flags do different things. --allowedTools decides what a run may use and leaves every built-in tool's schema in the context. Only --tools decides which tools exist for the run at all, and it keeps the other schemas out of the prompt.
Measured on an idle run, the runtime's full built-in set costs 20,811 prompt tokens and covey's default 11,045. The default holds thirteen tools for files, shell, web and tasks, among them Bash, Read, Edit, Grep and WebFetch. A comment in the source puts the saving for a 70-turn run at some 680,000 cache-read tokens.
The Skill tool is left out of the default on purpose. Skill pulls the descriptions of all built-in skills into the prompt, 2,454 extra tokens as measured, so it is added only to a run that has skills materialized for it.
The cost of this shows up when you extend the list. A built-in tool an agent is meant to use has to be named in COVEY_RUNTIME_TOOLS. Anything missing from the list is absent from the run altogether. Target-system actions are unaffected, since they reach the run through the action proxy and follow the agent's ACCESS.md.
That effect depends on the adapter: the scope takes effect with the Claude Code adapter and with educa AI, whose adapter starts the same Claude Code run with its base URL pointed at educa. Neither the SevenCode nor the Codex adapter hands the list to its command line, and for SevenCode a comment in the source gives the reason: that CLI has no flag for it.
The cost view splits by cost type and counts each run's actions
Under Costs, two views place an expensive run from two sides. "Cost types" splits the tokens of the organization, or of one selected agent, over the chosen period into cache read, cache written, uncached input and output. For each part it gives the token count and its percentage, so the side carrying the weight is visible.
"Most expensive runs" ranks individual runs by cost, through GET /api/v1/cost/runs for the organization and GET /api/v1/agents/{id}/cost/runs for one agent. Its "Actions" column counts what a run executed through the action proxy. Where that count is zero the UI shows "idle", and the tooltip explains that such a run read, thought and went back to sleep. In any aggregate such a run looks exactly like one that fixed three bugs.
The reverse is a weaker signal. The column counts every recorded action event of the run, including failed calls and the platform's own actions such as set_stage or a note. A run that only moved itself to a new board column shows up with a 1.
For the 70-turn run that gives an order to work in. "Most expensive runs" first shows whether it executed anything outside its sandbox. Cost types for its agent then show what share of the tokens over that period sits on the cached input side. Only after that is it worth looking at the tool scope the model re-read on each of those 70 turns.