[Bug] Context Window Overflow Despite Reported Available Space

Resolved 💬 4 comments Opened Aug 25, 2025 by kenk667 Closed Jan 4, 2026

Bug Description
I keep hitting 200k context window max when /context shows that I have plenty of space, and that the calude.md file doesn't eat up much for context. At this point, claude code is unusable , and I need to make a decision on what else I can use instead

Environment Info

  • Platform: linux
  • Terminal: vscode
  • Version: 1.0.90
  • Feedback ID: e036b2f5-4b0a-47d4-acf0-8aff0709095a

Errors

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"input length and max_tokens exceed context limit: 197089 + 21333 > 200000, decrease input length or max_tokens and try
again"},"request_id":"req_**************************"}

/compact

⎿ Error: Error during compaction: Error: Failed to generate conversation summary - response did not contain valid text content

[{"error":"Error: availableContext 1911 is less than FLOOR_OUTPUT_TOKENS 3000\n    at gG0 (/$bunfs/root/claude:1750:16994)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-08-25T20:04:10.897Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"input length and `max_tokens` exceed context limit: 197089 + 21333 > 200000, decrease input length or `max_tokens` and try again\"},\"request_id\":\"req_011CSV2XvoLJyfodR9HMHoj4\"}\n    at new nW (unknown:1:28)\n    at new a5 (/$bunfs/root/claude:765:1962)\n    at new _10 (unknown:1:28)\n    at generate (/$bunfs/root/claude:765:2419)\n    at makeRequest (/$bunfs/root/claude:782:5329)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-08-25T20:04:10.934Z"},{"error":"Error: Failed to generate conversation summary - response did not contain valid text content\n    at PL0 (/$bunfs/root/claude:2277:1170)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-08-25T20:04:53.282Z"},{"error":"Error: Error during compaction: Error: Failed to generate conversation summary - response did not contain valid text content\n    at call (/$bunfs/root/claude:2310:238)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-08-25T20:04:53.299Z"}]

Info

/context
⎿ ⛁ ⛀ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛀ ⛀
⛁ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ Context Usage
⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ claude-sonnet-4-20250514 • 19k/200k tokens (9%)
⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶
⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛁ System prompt: 3.1k tokens (1.5%)
⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛁ System tools: 11.6k tokens (5.8%)
⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛁ MCP tools: 927 tokens (0.5%)
⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛁ Memory files: 1.3k tokens (0.7%)
⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛁ Messages: 2.0k tokens (1.0%)
⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ Free space: 181.1k (90.6%)

MCP tools · /mcp
└ mcp__ide__getDiagnostics (ide): 428 tokens
└ mcp__ide__executeCode (ide): 499 tokens

Memory files · /memory
└ Project (/home/meow/git/kindo/osint/CLAUDE.md): 1.3k tokens

View original on GitHub ↗

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