[FEATURE] Expose /context breakdown data to status line formatters
Resolved 💬 3 comments Opened Jan 12, 2026 by ssugar Closed Jan 12, 2026
Problem
The /context command provides detailed breakdown of context usage (system prompt, tools, agents, skills, MCP servers, memory files, messages), but this data is not accessible to custom status line scripts.
Status line formatters currently receive basic JSON via stdin but cannot determine what is consuming the context window, only the total token counts from parsing transcript files.
Proposed Solution
Add a context_breakdown field to the status line JSON payload that mirrors the /context command output:
{
"hook_event_name": "Status",
"session_id": "...",
"transcript_path": "...",
"model": { ... },
"context_breakdown": {
"system_prompt": 3200,
"system_tools": 11600,
"custom_agents": 69,
"skills": 450,
"mcp_servers": 1200,
"memory_files": 743,
"messages": 1200,
"total_used": 18462,
"max_tokens": 200000,
"free_space": 181538
}
}
Use Cases
- Real-time context monitoring - Visual breakdown in status line (e.g., ASCII bar charts)
- Context alerts - Warn when specific categories consume too much context
- Optimization guidance - Identify which components to disable/manage
- Session analytics - Track context composition patterns
Example
With this data, status lines could display:
Ctx: [■■■■■■▓▓▒░·········] 18k/200k | ■sys:75% ▓mem:4% ▒msg:6% ░agent:0.3%
Implementation Notes
- Data already computed for
/contextcommand - just expose it - Backward compatible (existing status lines ignore unknown fields)
- Optional field (only populated when available)
Related
- Project: ccstatusline - custom status line formatter
- Currently limited to showing input/cache/output token breakdown
- Full breakdown would enable richer status line experiences
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗