Show context-window usage (%) per agent in the background agents list / FleetView

Resolved 💬 2 comments Opened Jun 6, 2026 by paprikati Closed Jul 13, 2026

What

Add a per-agent context-window usage indicator (e.g. a percentage) to each row of the background agents list — the view shown via claude agents, --bg, and /background. Today that view groups sessions by state (Needs input / Working / Completed) but shows no per-agent token or context-window metrics.

Why

When running several background agents at once, the single most useful at-a-glance signal is how full each agent's context window is. It tells me which agents are about to compact (and start degrading) and which still have headroom — without having to open each one. There's currently no way to see this from the fleet list.

Current state / workarounds

  • statusLine exposes an exact context percentage (context_window.used_percentage), but only for the focused/main session — not the agents list.
  • subagentStatusLine can render a custom per-row body, but (a) it only drives the in-session subagent panel below the prompt, not the background-agents list, and (b) its stdin payload exposes only a raw tokenCount per task — there's no context_window_size or used_percentage — so even there a true % can't be computed, only an approximation against an assumed window size.

So there is no native or configurable way to surface context % in the claude agents list.

Proposal (any one of these would solve it)

  1. A native context-% column/indicator in the agents list, ideally toggleable.
  2. Extend subagentStatusLine (or add an analogous agentListStatusLine) so it also drives the background-agents list rows, and include context_window fields (size + used_percentage) in its stdin payload so a true percentage can be rendered.

Either would let me watch context pressure across a whole fleet of agents at a glance.

View original on GitHub ↗

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