← Back to Kontasks
StatusLine Metrics Analysis & Recommendations
Analysis of currently captured StatusLine metrics and recommendations for navbar display and telemetry improvements
Output
📊 StatusLine Metrics Analysis
Currently Captured (Raw JSONL)
Hook script posts ~every 300ms to /statusline endpoint:
context_window: • context_window_size: 200000 • total_input_tokens: cumulative input • total_output_tokens: cumulative output • current_usage: - input_tokens, output_tokens - cache_creation_input_tokens - cache_read_input_tokens cost: • total_cost_usd: $0.05234 • total_duration_ms: wall-clock time • total_api_duration_ms: actual API time • total_lines_added: code churn • total_lines_removed: code churn model: { id, display_name } session_id: Claude session ID workspace: { current_dir, project_dir }
🎯 Recommended Navbar Metrics
Add a panel styled like the git panel with these live metrics:
$0.05
Session Cost
45K
Tokens
72%
Cache Hit
15%
Context
Display as compact pills: $0.05 45K tok 72% cache
⚠️ Underutilized Metrics
| Cache Efficiency | cache_read / (input + cache_creation) | Shows how well context is being reused |
| API vs Wall-Clock | api_duration / total_duration | Network/overhead ratio |
| Code Velocity | lines_added / cost | Lines per dollar spent |
| Context Pressure | (input + output) / window_size | How close to compaction |
| Output Ratio | output_tokens / input_tokens | Productivity indicator |
📈 Telemetry Page Enhancements
- Session Cost Trends - Line chart of cost over time (daily/weekly)
- Cache Hit Rate - How well prompt caching is working
- Token Efficiency - Input vs output ratio trends
- Context Window Pressure - % usage over sessions, compaction frequency
- Code Churn Metrics - Lines added/removed per session
- Model Distribution - Which models are being used (Opus, Sonnet, Haiku)
✅ Implementation Plan
- Add StatusLine stats endpoint -
GET /api/statusline/livereturning latest session metrics - Create navbar panel - Compact pills showing cost, tokens, cache % (updates every 5s)
- Enhance telemetry page - Add StatusLine-derived charts and metrics
- Add session storage - Currently only appends to JSONL, add per-session aggregation
Quick Actions
Original Request
No layout configured
Details
Type
General
Status
Completed
Scope
vibetools
Tags
telemetryuinavbar
Created
5 Jan 2026, 12:27 am
Updated
5 Jan 2026, 12:27 am
Created By
claude
Raw Data
{
"id": "e9875129-0c87-4369-8a11-ba858cff4eed",
"type": "general",
"status": "completed",
"title": "StatusLine Metrics Analysis & Recommendations",
"description": "Analysis of currently captured StatusLine metrics and recommendations for navbar display and telemetry improvements",
"context": {
"output": "<div style=\"background:#1e1e1e;color:#e0e0e0;padding:20px;border-radius:8px;font-family:'Segoe UI','Helvetica Neue',sans-serif;\">\n<h2 style=\"color:#fff;margin:0 0 16px 0;\">📊 StatusLine Metrics Analysis</h2>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#d4af37;margin:0 0 12px 0;\">Currently Captured (Raw JSONL)</h3>\n<p style=\"color:#9ca3af;margin:0 0 8px 0;\">Hook script posts ~every 300ms to <code style=\"background:#3d3d3d;padding:2px 6px;border-radius:3px;\">/statusline</code> endpoint:</p>\n<pre style=\"background:#1a1a2e;padding:12px;border-radius:4px;overflow-x:auto;font-size:0.85rem;line-height:1.6;\">\n<span style=\"color:#61afef;\">context_window:</span>\n • <span style=\"color:#e5c07b;\">context_window_size</span>: 200000\n • <span style=\"color:#e5c07b;\">total_input_tokens</span>: cumulative input\n • <span style=\"color:#e5c07b;\">total_output_tokens</span>: cumulative output\n • <span style=\"color:#e5c07b;\">current_usage</span>:\n - input_tokens, output_tokens\n - <span style=\"color:#98c379;\">cache_creation_input_tokens</span>\n - <span style=\"color:#98c379;\">cache_read_input_tokens</span>\n\n<span style=\"color:#61afef;\">cost:</span>\n • <span style=\"color:#e5c07b;\">total_cost_usd</span>: $0.05234\n • <span style=\"color:#e5c07b;\">total_duration_ms</span>: wall-clock time\n • <span style=\"color:#e5c07b;\">total_api_duration_ms</span>: actual API time\n • <span style=\"color:#98c379;\">total_lines_added</span>: code churn\n • <span style=\"color:#98c379;\">total_lines_removed</span>: code churn\n\n<span style=\"color:#61afef;\">model:</span> { id, display_name }\n<span style=\"color:#61afef;\">session_id:</span> Claude session ID\n<span style=\"color:#61afef;\">workspace:</span> { current_dir, project_dir }\n</pre>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#22c55e;margin:0 0 12px 0;\">🎯 Recommended Navbar Metrics</h3>\n<p style=\"color:#9ca3af;margin:0 0 12px 0;\">Add a panel styled like the git panel with these live metrics:</p>\n\n<div style=\"display:grid;grid-template-columns:repeat(2,1fr);gap:12px;\">\n<div style=\"background:#1a1a2e;padding:12px;border-radius:6px;\">\n<div style=\"font-size:1.2rem;color:#d4af37;font-weight:bold;\">$0.05</div>\n<div style=\"font-size:0.8rem;color:#9ca3af;\">Session Cost</div>\n</div>\n<div style=\"background:#1a1a2e;padding:12px;border-radius:6px;\">\n<div style=\"font-size:1.2rem;color:#22c55e;font-weight:bold;\">45K</div>\n<div style=\"font-size:0.8rem;color:#9ca3af;\">Tokens</div>\n</div>\n<div style=\"background:#1a1a2e;padding:12px;border-radius:6px;\">\n<div style=\"font-size:1.2rem;color:#61afef;font-weight:bold;\">72%</div>\n<div style=\"font-size:0.8rem;color:#9ca3af;\">Cache Hit</div>\n</div>\n<div style=\"background:#1a1a2e;padding:12px;border-radius:6px;\">\n<div style=\"font-size:1.2rem;color:#a78bfa;font-weight:bold;\">15%</div>\n<div style=\"font-size:0.8rem;color:#9ca3af;\">Context</div>\n</div>\n</div>\n\n<p style=\"color:#9ca3af;margin:16px 0 0 0;font-size:0.85rem;\">Display as compact pills: <span style=\"background:rgba(212,175,55,0.2);color:#d4af37;padding:2px 6px;border-radius:4px;font-size:0.75rem;\">$0.05</span> <span style=\"background:rgba(34,197,94,0.2);color:#22c55e;padding:2px 6px;border-radius:4px;font-size:0.75rem;\">45K tok</span> <span style=\"background:rgba(97,175,239,0.2);color:#61afef;padding:2px 6px;border-radius:4px;font-size:0.75rem;\">72% cache</span></p>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#f59e0b;margin:0 0 12px 0;\">⚠️ Underutilized Metrics</h3>\n<table style=\"width:100%;border-collapse:collapse;font-size:0.85rem;\">\n<tr style=\"border-bottom:1px solid #3d3d3d;\">\n<td style=\"padding:8px 0;color:#e5c07b;\">Cache Efficiency</td>\n<td style=\"padding:8px;color:#9ca3af;\">cache_read / (input + cache_creation)</td>\n<td style=\"padding:8px 0;color:#22c55e;\">Shows how well context is being reused</td>\n</tr>\n<tr style=\"border-bottom:1px solid #3d3d3d;\">\n<td style=\"padding:8px 0;color:#e5c07b;\">API vs Wall-Clock</td>\n<td style=\"padding:8px;color:#9ca3af;\">api_duration / total_duration</td>\n<td style=\"padding:8px 0;color:#22c55e;\">Network/overhead ratio</td>\n</tr>\n<tr style=\"border-bottom:1px solid #3d3d3d;\">\n<td style=\"padding:8px 0;color:#e5c07b;\">Code Velocity</td>\n<td style=\"padding:8px;color:#9ca3af;\">lines_added / cost</td>\n<td style=\"padding:8px 0;color:#22c55e;\">Lines per dollar spent</td>\n</tr>\n<tr style=\"border-bottom:1px solid #3d3d3d;\">\n<td style=\"padding:8px 0;color:#e5c07b;\">Context Pressure</td>\n<td style=\"padding:8px;color:#9ca3af;\">(input + output) / window_size</td>\n<td style=\"padding:8px 0;color:#22c55e;\">How close to compaction</td>\n</tr>\n<tr>\n<td style=\"padding:8px 0;color:#e5c07b;\">Output Ratio</td>\n<td style=\"padding:8px;color:#9ca3af;\">output_tokens / input_tokens</td>\n<td style=\"padding:8px 0;color:#22c55e;\">Productivity indicator</td>\n</tr>\n</table>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#a78bfa;margin:0 0 12px 0;\">📈 Telemetry Page Enhancements</h3>\n<ul style=\"margin:0;padding-left:20px;color:#9ca3af;line-height:1.8;\">\n<li><strong style=\"color:#fff;\">Session Cost Trends</strong> - Line chart of cost over time (daily/weekly)</li>\n<li><strong style=\"color:#fff;\">Cache Hit Rate</strong> - How well prompt caching is working</li>\n<li><strong style=\"color:#fff;\">Token Efficiency</strong> - Input vs output ratio trends</li>\n<li><strong style=\"color:#fff;\">Context Window Pressure</strong> - % usage over sessions, compaction frequency</li>\n<li><strong style=\"color:#fff;\">Code Churn Metrics</strong> - Lines added/removed per session</li>\n<li><strong style=\"color:#fff;\">Model Distribution</strong> - Which models are being used (Opus, Sonnet, Haiku)</li>\n</ul>\n</div>\n\n<div style=\"background:#1a3a2e;padding:16px;border-radius:6px;border:1px solid rgba(34,197,94,0.3);\">\n<h3 style=\"color:#22c55e;margin:0 0 12px 0;\">✅ Implementation Plan</h3>\n<ol style=\"margin:0;padding-left:20px;color:#9ca3af;line-height:1.8;\">\n<li><strong style=\"color:#fff;\">Add StatusLine stats endpoint</strong> - <code style=\"background:#2d2d2d;padding:2px 6px;border-radius:3px;\">GET /api/statusline/live</code> returning latest session metrics</li>\n<li><strong style=\"color:#fff;\">Create navbar panel</strong> - Compact pills showing cost, tokens, cache % (updates every 5s)</li>\n<li><strong style=\"color:#fff;\">Enhance telemetry page</strong> - Add StatusLine-derived charts and metrics</li>\n<li><strong style=\"color:#fff;\">Add session storage</strong> - Currently only appends to JSONL, add per-session aggregation</li>\n</ol>\n</div>\n</div>",
"choices": [
{
"label": "Add navbar metrics",
"value": "Implement the StatusLine metrics panel in the navbar with cost, tokens, and cache % displayed as compact pills like the git panel",
"primary": true
},
{
"label": "Enhance telemetry",
"value": "Add StatusLine-derived metrics to the telemetry page including cache efficiency, cost trends, and code churn"
},
{
"label": "Both (full implementation)",
"value": "Implement both navbar metrics panel AND telemetry page enhancements for StatusLine data"
}
]
},
"createdBy": "claude",
"createdAt": "2026-01-04T14:27:50.248Z",
"updatedAt": "2026-01-04T14:27:50.426Z",
"scope": "vibetools",
"tags": [
"telemetry",
"ui",
"navbar"
],
"targetUser": "claude"
}