[Bug] Context limit warning triggered incorrectly when limit not reached

Resolved 💬 3 comments Opened Apr 16, 2026 by aiwarrior1 Closed May 24, 2026

Bug Description
"Context limit reached · /compact or /clear to continue" when it is not the case.

Environment Info

  • Platform: win32
  • Terminal: windows-terminal
  • Version: 2.1.112
  • Feedback ID: 00e2fd2b-d794-46be-b20b-8fc1ca33e07f

Errors

[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"prompt is too long: 1080837 tokens > 1000000 maximum\"},\"request_id\":\"req_011Ca8LixSeA2R3hFxULs7TE\"}\n    at generate (B:/~BUN/root/src/entrypoints/cli.js:11:52456)\n    at makeRequest (B:/~BUN/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-16T23:45:56.102Z"}]

View original on GitHub ↗

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