Expose per-item context breakdown in status line hook JSON

Resolved 💬 3 comments Opened May 12, 2026 by MohamedBIqbal Closed May 15, 2026

Feature Request

Current behavior: The status line hook receives aggregate context data (context_window.used_percentage, context_window.context_window_size), but no per-item breakdown of what's consuming context.

Desired behavior: Include a context_breakdown array in the JSON passed to status line hooks, so users can render a real-time top-N context consumer display:

CTX 81% of 200K | skills:12% | CLAUDE.md:5% | conversation:64%

Proposed JSON addition:

{
  "context_window": {
    "used_percentage": 81,
    "context_window_size": 200000,
    "breakdown": [
      {"item": "conversation", "tokens": 128000, "percentage": 64},
      {"item": "skills", "tokens": 24000, "percentage": 12},
      {"item": "CLAUDE.md", "tokens": 10000, "percentage": 5}
    ]
  }
}

Why: The /context command shows this breakdown interactively, so the data exists internally. Exposing it in the status line hook JSON would let power users monitor context budget in real time — especially useful for projects with many skills where context pressure is a concern.

Workaround considered: Parsing /context CLI output via a hook, but this is fragile and not a clean API contract

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗