Parent
Epic: #426
Summary
Track token savings from output filtering and expose via metrics for monitoring and tuning.
Design
- Extend
FilterResult with raw_chars and filtered_chars
- Token estimation:
chars / 4 (standard heuristic)
- Record per-filter stats in
MetricsCollector:
tool_output_raw_tokens (counter)
tool_output_filtered_tokens (counter)
tool_output_savings_pct (gauge, rolling average)
tool_output_filter_hits (counter per filter name)
- Surface in TUI dashboard (tools panel)
- Log summary at session end: "Tool output filtering saved ~X tokens (Y%)"
Acceptance Criteria
Parent
Epic: #426
Summary
Track token savings from output filtering and expose via metrics for monitoring and tuning.
Design
FilterResultwithraw_charsandfiltered_charschars / 4(standard heuristic)MetricsCollector:tool_output_raw_tokens(counter)tool_output_filtered_tokens(counter)tool_output_savings_pct(gauge, rolling average)tool_output_filter_hits(counter per filter name)Acceptance Criteria