[FEATURE] A "context 80% full" indicator to warn that context window may run out.

Resolved 💬 4 comments Opened Mar 13, 2026 by Cyberneza Closed May 1, 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

I encountered a crash because the context window was exceeded. The error was "prompt is too long" it was not recoverable.

I moved to a new chat and asked "why cant the system tell me if the context window is almost full"

requesting a warning if we are getting close to exceeded the context window. perhaps periodic recommendations for /compact

This was claude's response:

That's a fair question. A few reasons:

What Claude Code does do:

It automatically compresses older messages as the context approaches the limit (you may have seen a note about this in the system prompt). This buys extra room by summarizing earlier parts of the conversation.
The /compact command lets you manually trigger compression before it becomes critical.
Why there's no explicit warning:

The context limit is measured in tokens, not characters or messages. Token count is hard to predict from the user side — a short message with code or terminal output can consume far more tokens than a long plain-text message.
Compression happens silently in the background, so in many sessions you never hit the wall at all. Your session was unusually large (full architecture review + multi-wave implementation + large terminal pastes) which overwhelmed even the compression.
What you can do proactively:

Use /compact after major milestones — e.g., after finishing a wave, run /compact to compress the history before starting the next wave
Start fresh sessions for new phases — Phase 1 done? New session for Phase 2. The checkpoint files make this seamless.
Don't paste large terminal output — summarize instead ("tests passed", "pip install succeeded")
Should the tool warn you? Yes — a "context 80% full" indicator would be genuinely useful. That's worth raising as a feature request at https://github.com/anthropics/claude-code/issues if you want to see it built.

Proposed Solution

a "context 80% full" indicator would be genuinely useful. perhaps recommend compact periodically

Alternative Solutions

_No response_

Priority

High - Significant impact on productivity

Feature Category

CLI commands and flags

Use Case Example

_No response_

Additional Context

_No response_

View original on GitHub ↗

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