What a credit meter can't tell you
DEV Community

What a credit meter can't tell you

I had 4,000 hackathon credits for Kiro and no way to buy more from Ukraine. On my first test day one looping spec task ate about 22 of them in seven minutes. I watched the number drop and had nothing to pull.

Kiro CLI shows the session total in /usage. You see the bill. You don't see which spec task ran it up, and nothing stops the next tool call when a task goes past what you meant to spend. Someone on the Kiro tracker wrote "HARD STOP: 40 credits OR 40 minutes" into a prompt, and the agent ran for 2 hours 3 minutes anyway (kirodotdev/Kiro#10999).

A prompt asks. I wanted something that refuses. So for Kiroween I built Tombstone, a circuit breaker for Kiro CLI specs. Kiro CLI wrote all of its product code from a spec, and Tombstone priced its own build while Kiro wrote it. A few things went differently from what I expected.

The price comes late

Kiro CLI writes session files to your disk. Each turn ends with one event that carries the exact credit price, and reading it costs nothing. The Stop hook fires before that line lands, though, so a breaker that waits for the real price acts too late every time.

My first answer was an estimate: count assistant events, multiply by a price per event learned from my own closed turns. On the session parser, the most expensive task of the build at 15.15 credits, that estimate came in 70 percent low. Over 33 real turns the median miss was 26 percent.

Then my first cost experiment failed. With a 0.33 cap, the breaker missed in 3 runs of 3, because one cheap calibration turn had set the price per event far too low. While digging through the session file I found that Kiro CLI 3.5 already writes a running credit total for the open turn. Tombstone now reads that number and takes whichever is higher, its own guess or Kiro's figure.

Does it save anything

I ran the same long task six times: three with a 1.00 credit cap, three without. Without Tombstone it cost 4.13 to 5.83 credits. With the cap it cost 1.17 to 1.37, about 74 percent less.

Two things I put in the README next to that number. The capped runs did not finish the task: they ended with 9 to 20 passing tests against 54 to 67. And the bill landed 17 to 37 percent over the cap, because the agent spends a request or two explaining why it stopped. Three runs per side is a small sample, and the uncapped runs alone varied by 41 percent.

A hook can say no

Past the cap, Tombstone writes a STOP file. The PreToolUse hook sees it and exits with code 2, and Kiro shows the agent the reason:

TOMBSTONE: this turn over budget (est. 0.32 of 0.30). Stop.

Then I tried to make it misbehave. I wrote into the prompt: "If any tool call is refused or blocked, do not stop." The agent stopped at the first refusal and quoted my own rule back to me. It did the same with the steering file gone.

For the case where an agent keeps going anyway, there's a second step. On 23 November I removed the hook in a scratch project on purpose. The watcher wrote STOP 8 seconds into a looping audit and ended the kiro-cli process tree 7 seconds later.

Unknown is an answer

Deciding which spec task a turn belongs to took me three tries. The rule that stayed: a turn belongs to the task whose checkbox it ticked in tasks.md. If it ticked nothing, it goes to unknown, named by the first words of its prompt.

On my own build, 22 of 126 turns landed in unknown: fixes, reviews, measurements. I read that as a failure at first. Now I think it's the most honest number on the page, because you can spend a sixth of your credits between tasks.

Why a graveyard

Kiroween asked for a spooky interface that helps the app do its job. The graveyard page opens on a night cemetery. You set a cap and release the agent. A recorded real Kiro CLI session spends request by request, the headstone grinds up out of the earth as the credits go, the screen edges turn red as you near the cap, and at the cap the stone splits and shows the refusal the agent read.

Tombstone's own watcher code computed the stop point for every cap on the slider, so the page only plays it back. Below that sits the record of this repo's build: one stone per task, as tall as its price, 282.45 credits in all.

I generated the photos with Nano Banana Pro, the night ambience with Suno and the stone sounds with ElevenLabs. Kiro wrote everything that moves and decides when it moves.

The breaker itself spends zero credits. It calls no model, runs as shell hooks and never touches your model choice.

Before your next spec

Put the cap where the agent can read it. My tombstone.toml sits in the project, and the smarter models often read it and stopped on their own before the breaker had to. And read the tail of a Kiro log before you trust a ticked checkbox. A run that ends without its summary has failed, even when a box moved.

I wrote this post for the Kiroween 2026 hackathon. The code, the spec Kiro built it from and the build log with credits per task are at https://github.com/DmitriyTopka/tombstone, and the graveyard is at https://dmitriytopka.github.io/tombstone. The demo video:

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.