Handing cartographer files one at a time had been working, so I did the obvious next thing and wrote the four lines that walk a repository and concatenate every source file into one string. Large cont

Markdown supported · ⌘↵ to post
Good practical framing. One thing worth adding: in tool-heavy sessions the dominant token cost often isn't the repo at all — it's tool outputs (test logs, command results, large diffs) that pile up in the transcript. A meter that only tracks repo size can understate real pressure, so tracking both sides of the ledger makes the budget more honest.
I don’t have usage-cost data to cite for orke, but for multi-agent workflows I’d split the meter by task and handoff as well as input/output. A whole-run total can hide whether cost came from generating once or resending shared context across steps. I’d validate an estimate against a small representative run and record the model/version so it doesn’t silently drift. Does your meter preserve per-request usage for that breakdown? I’m with BOMTOBE, makers of orke.
Really useful breakdown, especially the point that measuring characters or using the wrong tokenizer can give a misleading picture of an AI agent’s actual cost. I like how you turn an easily overlooked technical detail into a practical lesson about budgeting, context limits, and smarter system design. At Oglas AI, we believe building effective AI solutions means thinking beyond the model itself and paying attention to efficiency, reliability, and real world costs. Looking forward to the next part of this series!
Kartik N V J K
AI Developer | Making AI reliable, trustworthy & accessible to everyone | Active community contributor
Two samples and a subtraction to cancel the chat template overhead is such a cheap fix, and I had been dividing by a single sample without ever thinking about it. The line about the transcript re-sending itself on every call matches what hurt my agent costs, long before the window itself filled up. Do you re-measure the ratio only when you switch models, or on every run?