Statusline context_window.used_percentage doesn't match actual context usage

Resolved 💬 2 comments Opened Feb 12, 2026 by VagnerVit Closed Feb 13, 2026

Problem

The context_window.used_percentage value provided in the JSON input to the statusLine command doesn't match the actual context usage displayed in the CLI UI.

Expected Behavior

When the UI displays "Context low (2% remaining)", the statusLine JSON input should report context_window.used_percentage at approximately 98%.

Actual Behavior

The statusLine receives context_window.used_percentage: 88% while the UI simultaneously shows "Context low (2% remaining)". This represents a consistent ~10% discrepancy between the JSON data and the actual context state.

Impact

Custom statusLine implementations cannot accurately display context usage to users, as the provided percentage doesn't reflect reality.

Configuration

Using a custom PowerShell statusLine command that reads from stdin:

"statusLine": {
  "type": "command",
  "command": "pwsh -NoProfile -File statusline-command.ps1"
}

The script reads $input.context_window.used_percentage and displays it, revealing the mismatch with the UI warning.

Steps to Reproduce

  1. Configure a custom statusLine command that displays context_window.used_percentage
  2. Continue a conversation until context is nearly exhausted
  3. Observe the UI showing "Context low (2% remaining)"
  4. Compare with the percentage shown in the statusLine (will be ~10% lower)

View original on GitHub ↗

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