Skip to content

Provide native mechanisms for cost tracking #192

Open

Description

@jbeda

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions