Native context awareness for Claude and users

Resolved 💬 3 comments Opened Jan 25, 2026 by lbq110 Closed Jan 29, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Currently, Claude Code has no native way to:

  1. Let Claude know how much context window is being used
  2. Let users easily see context usage status
  3. Trigger actions when context reaches certain thresholds

We had to build a complex workaround using:

  • Status line script to read context_window.used_percentage and write to file
  • Stop hook to check thresholds and create trigger files
  • Manual CLAUDE.md instructions for Claude to check trigger files
  • ANSI color codes for visual alerts

This requires 5 shell scripts + 3 config files + multiple hours of debugging to achieve what should be a
simple built-in feature.

Proposed Solution

  1. Expose context percentage to Claude directly
  • Allow Claude to access context.percent or similar variable
  • No need for external file-based workarounds
  1. Built-in threshold alerts
  • Configurable thresholds (e.g., 30%, 60%, 90%, 99%)
  • Visual indicator in status line when threshold crossed
  • Optional hook trigger on threshold
  1. Declarative configuration

```json
{
"contextAlerts": {
"thresholds": [30, 60, 90, 99],
"showInStatusLine": true,
"onThreshold": ".claude/scripts/on-threshold.sh"
}
}

Alternative Solutions

_No response_

Priority

Critical - Blocking my work

Feature Category

CLI commands and flags

Use Case Example

_No response_

Additional Context

Why This Matters

  • For users: Know when to save/summarize conversation before context runs out
  • For Claude: Make better decisions about response length and complexity
  • For productivity: Avoid losing important context due to unexpected truncation

View original on GitHub ↗

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