You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've had good luck asking Claude Code to examine it's own session logs to be able to estimate the costs for any action.
I'd like to have native support (tools) for the agent to be able to introspect it's own usage. Things that are useful:
A way to get the number of tokens across multiple categories from the start of the session.
A way to convert token to $ estimates based on a price sheet.
A way to create a session "cost checkpoint" that gets stored with the session so that the agent can ask for token counts/costs between two checkpoints. Implicit checkpoint at "start" and "now"
Cost reporting for sub-agents (including any deep hierarchies).
All tokens are reported in the context of the model that is used there as the cost for tokens isn't totally equal.
There is context weight for each new tool so if we could make this one tool with options may be more efficient than having a set of tools that work together.
Activity
jbeda commentedon Jun 26, 2026
I built a plugin for claude code that does something similar: https://github.com/stacklok/claude-plugins/blob/main/plugins/meter/README.md
feat(telemetry): opt-in telemetry for headless binaries (mecatequi, m…
feat(telemetry): opt-in telemetry for headless binaries (mecatequi, m…
feat(telemetry): opt-in telemetry for headless binaries (mecatequi, m…
feat(telemetry): opt-in telemetry for headless binaries (mecatequi, m…