-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
M26Milestone 26: Smart tool output filteringMilestone 26: Smart tool output filteringP2Nice-to-have priorityNice-to-have prioritysize/Stoken-savingsToken economy improvementsToken economy improvementstoolsTool execution and MCP integrationTool execution and MCP integration
Description
Parent
Epic: #426
Summary
Track token savings from output filtering and expose via metrics for monitoring and tuning.
Design
- Extend
FilterResultwithraw_charsandfiltered_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
- FilterResult carries raw/filtered sizes
- MetricsCollector updated per tool execution
- Session-end summary logged
- TUI display (optional, if TUI feature enabled)
- Unit tests for metric recording
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
M26Milestone 26: Smart tool output filteringMilestone 26: Smart tool output filteringP2Nice-to-have priorityNice-to-have prioritysize/Stoken-savingsToken economy improvementsToken economy improvementstoolsTool execution and MCP integrationTool execution and MCP integration