Context Limit Exceeded When Uploading Large File
Resolved 💬 3 comments Opened Jun 24, 2025 by matalla Closed Jan 4, 2026
Bug Description
when attaching a large file i get this: Error: Error during compaction: Error: API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"input length and max_tokens exceed context limit: 198127 + 20000 > 200000, decrease input length or max_tokens
and try again"}} but after this if i want to ignore this and continue it keeps giving the same error, the only solution is to exit and run claude again.
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 1.0.27
- Feedback ID: 8bc83f77-1b8e-4e0f-950a-b726afb3eea2
Errors
[{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n at aD (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1465:1176)\n at file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1465:910\n at Array.map (<anonymous>)\n at _K (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1465:901)\n at Object.renderToolUseRejectedMessage (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1465:5422)\n at M$2 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1910:2841)\n at PE (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:142:19803)\n at Yq (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:144:3199)\n at gT (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:144:43331)\n at vT (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:144:38104)","timestamp":"2025-06-24T21:23:17.278Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n at aD (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1465:1176)\n at file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1465:910\n at Array.map (<anonymous>)\n at _K (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1465:901)\n at Object.renderToolUseRejectedMessage (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1465:5422)\n at M$2 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1910:2841)\n at PE (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:142:19803)\n at Yq (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:144:3199)\n at gT (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:144:43331)\n at vT (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:144:38104)","timestamp":"2025-06-24T21:23:17.442Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n at aD (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1465:1176)\n at file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1465:910\n at Array.map (<anonymous>)\n at _K (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1465:901)\n at Object.renderToolUseRejectedMessage (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1465:5422)\n at M$2 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1910:2841)\n at PE (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:142:19803)\n at Yq (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:144:3199)\n at gT (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:144:43331)\n at vT (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:144:38104)","timestamp":"2025-06-24T21:23:17.627Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n at aD (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1465:1176)\n at file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1465:910\n at Array.map (<anonymous>)\n at _K (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1465:901)\n at Object.renderToolUseRejectedMessage (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1465:5422)\n at M$2 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1910:2841)\n at PE (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:142:19803)\n at Yq (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:144:3199)\n at gT (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:144:43331)\n at vT (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:144:38104)","timestamp":"2025-06-24T21:23:17.792Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n at aD (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1465:1176)\n at file:///usr/local/lib/node_modules/@anthropic-ai/claude-c
Note: Error logs were truncated.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗