[BUG] Context incorrect calculation in Warning Message

Resolved 💬 4 comments Opened Oct 14, 2025 by Notum Closed Oct 18, 2025

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Claude Code shows me Low Context Warning: Context low (0% remaining) · Run /compact to compact & continue
But in /context command output I see that I still have 15% of Context Window Free Space'

<img width="470" height="169" alt="Image" src="https://github.com/user-attachments/assets/29bd6ab4-8c62-48a5-a450-caa6456e32f1" />

What Should Happen?

Use correct percentage counter or maybe there is a wrong mechanism how Claude Code calculates Context Windows Free Space.

Error Messages/Logs

Steps to Reproduce

There is no special steps to reproduce.
I just see this Warning message during my everyday working with Claude Code.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.14

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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