
Tracking LLM Token Usage Across Docker Sandboxes
I run coding agents inside disposable Docker Sandboxes (sbx) to keep my system safely isolated from agents that I run. Getting a view of token usage across all agents I run, in all sandboxes, is not easy. Every agent writes its own session logs inside the sandbox. When you spin up half a dozen sandboxes across different projects and destroy them after work finishes, token counts and spend metrics will therefore disappear along with the sandboxes. To solve this, I put together krisfoster/ccusage-sbx, an experimental Docker Sandbox kit and host hub that syncs token consumption from ephemeral sandboxes into a centralised dashboard on your local machine. It provides a dashboard that gives a consolidated view of token consumption across every sandbox. You can stack the daily spend chart by sandbox name, agent type, or model, filter by custom date windows, and inspect per-machine and per-model costs without leaving your browser. It’s very much a PoC, so expect sharp edges. ...
