Token burn is a merge metric, not a chat metric. Session totals hide the number a team can actually defend: tokens spent per change that shipped. This playbook puts a tripwire on that number and closes every shift against it.
The framing matters. A lane that burns four times the tokens for the same merged patch needs a rule, not a bigger allowance. Rate decides whether a free lane scales.
One row per shift
The ledger stays boring on purpose. Five comma-separated fields, no free text. Free text is where shared ledgers rot.
shift,model_lane,tokens_in,tokens_out,merged
2026-11-02-a,free-lane,410000,52000,3
2026-11-02-b,free-lane,980000,140000,0
2026-11-03-a,free-lane,360000,41000,2
tokens_in and tokens_out come from the lane's own usage report. merged counts pull requests a human reviewer merged. No merge, no credit. That one rule kills most of the gaming.
The gate script
Save as burn_gate.sh. The ceiling is an argument, never a constant, so the team can move it without a code review.
#!/usr/bin/env sh
# burn_gate.sh - fail when token burn per merged change crosses a team ceiling.
# Usage: ./burn_gate.sh ledger.csv 250000
set -eu
LEDGER="${1:?usage: burn_gate.sh <ledger.csv> <ceiling_tokens>}"
CEILING="${2:?usage: burn_gate.sh <ledger.csv> <ceiling_tokens>}"
awk -F, -v ceiling="$CEILING" '
NR == 1 { next }
{
s = $1
burn[s] += ($3 + 0) + ($4 + 0)
merges[s] += ($5 + 0)
}
END {
rc = 0
for (s in burn) {
if (merges[s] == 0) {
printf "%-12s burn=%-9d merges=0 HOLD\n", s, burn[s]
rc = 1
continue
}
rate = burn[s] / merges[s]
verdict = (rate > ceiling) ? "FAIL" : "PASS"
if (rate > ceiling) rc = 1
printf "%-12s burn=%-9d merges=%d rate=%-9.0f %s\n", s, burn[s], merges[s], rate, verdict
}
exit rc
}' "$LEDGER"
Run it at shift close. Paste the exit code into the handoff note. A non-zero code blocks the next shift from opening a second lane.
$ ./burn_gate.sh ledger.csv 250000
2026-11-02-a burn=462000 merges=3 rate=154000 PASS
2026-11-02-b burn=1120000 merges=0 HOLD
2026-11-03-a burn=401000 merges=2 rate=200500 PASS
$ echo $?
1
Two verdicts carry the weight. FAIL means the lane crossed the ceiling while merging work. HOLD means burn with nothing merged, which is the stronger signal of the two. A held shift is cheap to fix and expensive to ignore.
The 250000 figure above is a placeholder. Pick a ceiling from your own first week of rows, not from this article. The script has no opinion about what a token is worth.
Where the free lane enters
The gate needs a place to run that is not somebody's laptop. A free server option keeps the ledger, the script, and the test run in one reproducible box. MonkeyCode exposes free model access plus a free server option for exactly that kind of shared, low-stakes run; the project also advertises a free token allowance reported as 10 million tokens. Confirm the current terms on the project's own page before you build a ceiling around them.
Disclosure: This article was prepared as part of MonkeyCode's product outreach.
Free capacity changes without notice, and that is a design input, not a complaint. The tripwire exists because free lanes are finite. A team that measures burn per merge survives a quota change without an argument.
The one-page wiki card
Paste this block into the team wiki. Three checkpoints, no roles to memorize.
### Free-Lane Burn Gate
Checkpoint 1 - Open
- Append a ledger row for the shift before the first prompt.
- Set the ceiling for the week. Record it in the shift note.
Checkpoint 2 - Gate
- Run: ./burn_gate.sh ledger.csv <ceiling>
- Copy the full output into the shift note. Do not summarize it.
- FAIL or HOLD: no second lane, no new scope.
Checkpoint 3 - Close
- Re-run the gate after the last merge lands.
- Weekly: sum burn, sum merges, divide once. Post the single number.
- If the weekly rate rises two weeks running, change the workflow first, budget second.
Rule of record
- merged = pull requests a human merged. Drafts and abandoned patches score zero.
One line in that card does most of the work. Weekly division stops a single tiny shift from poisoning the average.
What breaks
Small samples lie. A shift with one trivial merge can show a rate far above the ceiling while nothing is wrong. Judge weekly, and treat single-shift FAIL as a note rather than a verdict.
Mixed lanes blur the number. If a shift used both a free lane and a paid lane, split the row. Blended burn reads well and teaches nothing.
Free tiers queue. Long runs on shared free capacity can stall mid-shift, which inflates wall-clock time but not token burn. Keep those two metrics separate or the gate will punish the wrong thing.
Who should skip this
Teams with no merge history should measure first and gate second. A ceiling invented before the first week will be wrong in both directions.
Teams under data-residency or audit constraints should not route code through any free shared lane, including this one. The savings do not survive a compliance finding.
Teams needing guaranteed latency should stay on provisioned capacity. A gate cannot fix a queue.
Start with one week of rows and one ceiling. The ledger costs minutes; the argument it prevents costs an afternoon. Readers who want to test the free lane can open the MonkeyCode project page and confirm the current free allowance before wiring the gate to it.
Top comments (0)