Feature Request: Always-visible context usage with detailed breakdown

Resolved 💬 3 comments Opened Jan 25, 2026 by RobSB2 Closed Jan 25, 2026

Problem

Currently, context usage information is only displayed when context is critically low (appears to show around 10-15% remaining). This makes it difficult to:

  1. Plan work sessions - Users can't gauge how much context headroom remains for large operations
  2. Make informed decisions - No visibility into whether reading a large file or codebase exploration will exhaust context
  3. Build context management workflows - Systems like persistent session tracking need to know when to checkpoint
  4. Avoid surprise compaction - Context exhaustion mid-task forces disruptive compaction or session restart

Additionally, the AI itself has no programmatic access to context metrics, so it cannot self-manage or warn users proactively.

Proposed Solution

1. Always-Visible Context Indicator
  • Show context usage percentage at all times (not just when critical)
  • Could be a subtle indicator in the UI that becomes more prominent as usage increases
2. Detailed Breakdown (Optional/Expandable)
  • Conversation history: X%
  • File reads this session: X%
  • System context: X%
  • Available: X%
3. Predictive Warnings
  • Before large file reads: "This file (~2000 lines) will use approximately 8% of context"
  • Before codebase exploration: "This search may consume significant context"
4. Programmatic Access for AI
  • Expose context metrics to the AI so it can:
  • Warn users proactively ("Context is at 60%, consider checkpointing")
  • Make informed decisions about exploration depth
  • Self-report usage after large operations
5. Post-Operation Feedback
  • After file reads or large operations, show: "This operation used X% of context"

Use Case

I've built CxMS (Context Management System) - an open-source framework that uses structured markdown files to preserve AI session state across context limits. It's designed to solve the "AI amnesia" problem where context resets lose all project knowledge.

CxMS provides:

  • Session state persistence via markdown templates
  • Structured prompts for session start/end
  • Activity logs, decision tracking, task management
  • Works with Claude Code, Cursor, Copilot, and other AI tools

Even with CxMS helping manage context, key challenges remain:

  • I can't tell users when to save session state because I don't know context usage
  • Large file reads sometimes unexpectedly exhaust context
  • The "context remaining" indicator only appears when it's nearly too late
  • Planning multi-file operations is guesswork

With visibility into context usage, both users and the AI could manage sessions more effectively.

Suggested Implementation (Minimal)

At minimum, an always-visible percentage indicator would solve 80% of the problem. Even a simple:

Context: 45% used | 55% available

...visible in the UI would be transformative for long coding sessions.

Environment

  • Claude Code CLI
  • Windows 11 / macOS / Linux
  • Sessions involving multiple file reads, codebase exploration, and extended conversations

---

Additional Context

This becomes especially important when:

  • Working with large codebases (many file reads)
  • Extended coding sessions (hours of conversation)
  • Using exploration/research agents that read many files
  • Building AI-assisted workflows that need predictable behavior

Thank you for considering this enhancement.

---

P.S. If you're struggling with context management today, check out CxMS - it won't solve the visibility problem, but it helps you preserve session state so context resets don't lose your work. Free and open source.

View original on GitHub ↗

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