Skip to content

Feature: Add token cost tracking to metrics collection #206

Description

@trevor-vaughan

Problem

internal/metrics/ already collects velocity, cycle time, and other workflow metrics. Adding token cost visibility would let teams understand the cost profile of different harness configurations and make informed decisions about which components to enable for their use case.

Proposed Solution

Instrument token counting at the MCP tool level, broken down by:

  • Harness content (agent prompts, convention packs, etc.)
  • User code (files read/written)
  • Conversation overhead

Expose via the existing metrics API and add a dashboard widget.

Acceptance Criteria

  • Add token counting at the MCP tool level
  • Break down costs by component (harness vs user code vs conversation)
  • Expose token metrics via the metrics API
  • Add a dashboard widget for token cost visualization
  • Document how to interpret token cost reports
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions