Feature: context window usage indicator in Claude Code UI

Resolved 💬 4 comments Opened Mar 26, 2026 by phasprofissional-arch Closed May 26, 2026

Feature Request

Add a context window usage indicator (percentage) visible in the Claude Code UI during active sessions.

Problem

Currently, there is no way to know how much of the context window has been consumed during a session. Users working on complex, multi-step tasks (project setup, architecture, multi-file implementations) can unexpectedly hit the context limit, which:

  • Breaks workflow — the session compresses or loses context mid-task
  • Causes lost work — important decisions, conventions, and in-progress plans may be lost in compaction
  • Forces reactive behavior — users only discover they're near the limit when it's too late
  • Reduces trust — users can't plan their work around the remaining capacity

Proposed Solution

Add a small, non-intrusive context usage indicator in the Claude Code status bar or header area. For example:

[Context: 42% used]  or  [Context: 420K / 1M tokens]

Requirements

  • Always visible in the UI (status bar, header, or footer area)
  • Shows percentage and/or absolute token count
  • Updates in real-time as the conversation progresses
  • Color-coded thresholds would be ideal:
  • Green (0-60%) — safe
  • Yellow (60-80%) — plan to wrap up or start a new session
  • Red (80-100%) — critical, compaction imminent
  • Should not require a slash command to check — must be passively visible

Use Cases

  1. Long implementation sessions — user can decide to commit and start a new session before hitting the limit
  2. Multi-phase projects — user can plan which phase to tackle in the current session
  3. Complex debugging — user knows when to save important context to memory before compaction
  4. Teaching/onboarding — new users understand why responses suddenly change quality (context was compressed)

Impact

This is a quality of life improvement that directly affects every single session. Users who work on real projects (not quick Q&A) spend significant time in long sessions and need this visibility to manage their workflow effectively.

Alternatives Considered

  • /context slash command — exists but requires the user to remember to check it manually, which defeats the purpose
  • Relying on compaction warnings — too late, context is already being lost

Priority Justification

Every IDE shows resource usage (CPU, memory, disk). Claude Code should show its most critical resource: context window capacity. This is fundamental to professional workflow management.

View original on GitHub ↗

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