I wanted a token budget before I had token numbers I trusted.
That sentence is a useful summary of how control systems get overbuilt.
Once we started letting autonomous work continue across more than one episode, the obvious worry was cost. A capable agent can always find another useful-looking thing to investigate. Even with a cycle limit, a few long runs can consume a lot more model usage than expected.
So: put a token ceiling on it.
Reasonable idea.
Then we looked at what we actually knew.
Not enough.
We had structured data and were throwing some of it away
The coding-agent tools behind Agent Bridge already produce machine-readable results. Codex, Claude and Antigravity each expose structured output in their supported command-line modes.
Our provider parsers mostly reduced those results to the things the runtime immediately needed: the answer text and the session identity.
Useful execution metadata could disappear at that boundary.
That matters because a token budget needs more than a number with the word tokens after it.
Providers report different categories. Input, cached input, cache creation, output and reasoning or thinking can have different meanings. Some providers report cost. Some report duration or turns. A category that looks additive in one provider may overlap another category somewhere else.
If we simply added every number we could find and called it totalTokens, the result would look precise while carrying semantics we had not proved.
A bad measurement with six digits is still a bad measurement.
The tempting shortcut was exactly the wrong one
We could scrape human-readable output. We could inspect private session files. We could estimate usage from text length. We could invent a cross-provider total and start enforcing it immediately.
All of those would make a budget possible sooner.
They would also couple a safety mechanism to evidence we did not trust.
That is backwards.
A limit is only as meaningful as the quantity being limited. If the accounting changes underneath it, the limit can trip too early, too late or differently depending on which provider happened to run.
The system would be bounded. We just would not know by what.
So the next step should be observational
The useful next move was not a token budget. It was to preserve the structured usage facts we could explain and see what real runs actually consumed.
Provider-specific interpretation belongs at the provider boundary. Missing fields should stay missing rather than being guessed. Raw provider payloads do not need to become durable telemetry merely because they contain useful numbers.
Where Agent Bridge already knows a fact mechanically — which provider succeeded, which model was selected, whether fallback occurred, how long the run took — it can preserve that without asking the provider to narrate it back to us.
Then we can look at real traces.
Only after that do I want to decide whether a token-aware budget is useful, which categories it should count and whether the same rule can sensibly apply across providers.
That is slower by one step. It is faster than building the wrong control twice.
This is not really a token lesson
The part I keep thinking about is how quickly anxiety turns into architecture.
We were worried an autonomous loop might burn tokens, so the natural response was to add a mechanism that made us feel in control.
Humans do this outside software too. A number is uncomfortable, so we set a target. A process feels unpredictable, so we add an approval. A risk is hard to describe, so we add a rule around the nearest thing we can count.
Sometimes that is exactly right.
Sometimes the control arrives before we understand the system it is meant to control.
Then the control starts shaping behaviour. People optimise for it. Agents optimise around it. Code grows around it. Eventually the original uncertainty is hidden behind a very respectable dashboard.
Measurement is not neutral either
There is a second trap here. 'Measure first' can sound as though measurement gives us objective truth for free.
It does not.
We still have to decide which provider fields are stable enough to preserve, which ones mean the same thing across versions, and what we are trying to learn from them. Provider-reported cost can be useful telemetry without becoming billing truth. Cached tokens should not be folded into a total merely because addition is easy. Reasoning tokens should not be double-counted because a field happens to be available.
The discipline is not 'collect everything'.
It is 'preserve what we can explain'.
That is a much less exciting telemetry strategy. Good.
We already have one useful budget
The autonomy experiment is not unbounded while we work out token data.
We already have a mechanical cycle limit. It describes something Agent Bridge owns directly: how many pieces of autonomous work one episode can start.
It is coarse. It is also trustworthy.
That is a better first guardrail than a supposedly sophisticated cost calculation built from provider fields we have not yet reconciled.
We can add precision when the evidence earns it.
The rule I want to keep
A control should follow the thing it controls, not our fear of the thing.
If we cannot yet explain the measurement, we are not ready to make it a hard boundary.
Observe the real system. Preserve the facts without pretending they are more comparable than they are. Look at the traces. Then decide what deserves a limit.
A limit on the wrong number is not discipline.
It is confidence with a counter.