Feature Request: Extend statusline JSON with detailed context breakdown and usage quota data
Resolved 💬 3 comments Opened Dec 18, 2025 by szerintedmi Closed Dec 22, 2025
Problem
Currently, the statusline JSON input only provides aggregate token counts (input_tokens, cache_creation_input_tokens, cache_read_input_tokens). To monitor context and usage effectively, users must repeatedly run /context and /usage commands manually.
This is problematic because:
- I often forget to check
/usageuntil I've exhausted my quota mid-session - The detailed context breakdown from
/context(system prompt, tools, MCP tools, agents, memory, messages) would help optimize context usage in real-time - There's no way to proactively monitor usage limits without interrupting workflow
Requested Additions to Statusline JSON
1. Detailed Context Breakdown (from /context)
{
"context_window": {
"breakdown": {
"system_prompt_tokens": 3200,
"system_tools_tokens": 16600,
"mcp_tools_tokens": 1800,
"custom_agents_tokens": 389,
"memory_files_tokens": 837,
"messages_tokens": 28100
},
"autocompact_buffer_size": 45000
}
}
2. Usage Quota Data (from /usage)
{
"usage_quota": {
"session": {
"used_percent": 20,
"resets_at": "2024-12-18T20:00:00Z"
},
"weekly": {
"used_percent": 44,
"resets_at": "2024-12-22T12:00:00Z"
},
"weekly_sonnet": {
"used_percent": 4,
"resets_at": "2024-12-22T12:00:00Z"
}
}
}
Use Case
I built a custom statusline script (gist) that displays context usage visually. With the requested data, I could:
- Show a color-coded breakdown matching
/contextoutput - Display usage quota warnings before hitting limits
- Make informed decisions about model switching (Opus vs Sonnet) based on remaining quota
Impact
This would significantly improve the Claude Code UX by enabling proactive resource monitoring without workflow interruption.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗