Skip to content

Add a telos usage command for token/cost visibility#5

Open
akshayakula wants to merge 3 commits into
telos-org:masterfrom
akshayakula:usage-command
Open

Add a telos usage command for token/cost visibility#5
akshayakula wants to merge 3 commits into
telos-org:masterfrom
akshayakula:usage-command

Conversation

@akshayakula

Copy link
Copy Markdown

Hey! Was good chatting yesterday. We're trying Telos out for our deploy agent's background work — running pi with Cerebras GLM 4.7 as the model — and the first thing we reached for was a quick way to see token burn across sessions. list has the COST column, but with a custom provider the pricing comes back zero, so the raw token counts are what actually matter for us.

This adds a small, purely additive telos usage command:

$ telos usage
NAME           STATUS      INPUT  OUTPUT  CACHE-R  CACHE-W  COST     SESSION
hello-service  completed   1200   300     5000     800      $0.2500  sess_a
TOTAL          1 sessions  1200   300     5000     800      $0.2500
  • Reads the same stores as list (root session tree when delegated, local store otherwise); child sessions stay in the report so totals don't undercount
  • --json emits rows plus aggregated totals (we feed this into our usage dashboard)
  • Sessions that haven't reported stats yet render -

gofmt clean, go build ./... and go test ./... pass locally.

Happy to rename/reshape (e.g. fold it into list --usage) if you'd prefer. Also noticed usage totals only land in the store at game_end, so running sessions show nothing — happy to take a swing at live running totals as a follow-up if that'd be welcome.

🤖 Generated with Claude Code

akshayakula and others added 3 commits July 2, 2026 09:26
Per-session token and cost reporting from the session store's existing usage fields.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant