claude-code
claude-code copied to clipboard
Context Limit Exceeded During Compaction Operation
Bug Description
/compact
⎿ Error: Error during compaction: Error: API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"input length and max_tokens
exceed context limit: 180287 + 32000 > 200000, decrease input length or max_tokens and try again"}}
Environment Info
- Platform: macos
- Terminal: cursor
- Version: 1.0.9
- Feedback ID: cfa6f56d-8a72-4a36-a6d6-c09f17618c85
Errors
[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n at __node_internal_genericNodeError (node:internal/errors:865:15)\n at checkExecSyncError (node:child_process:890:11)\n at execSync (node:child_process:962:15)\n at IZ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:638:3921)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:566:6771\n at Q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:526:17069)\n at ml (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:566:5963)\n at WG (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:566:5409)\n at fq2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2004:4707)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2212:2041","timestamp":"2025-06-03T03:49:42.660Z"},{"error":"Error: Request was aborted.\n at br._createMessage (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1342:6810)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-06-03T03:53:16.060Z"},{"error":"SyntaxError: Unexpected token N in JSON at position 48\n at JSON.parse (<anonymous>)\n at s5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:557:9977)\n at tN2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1916:672)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-06-03T05:36:41.557Z"},{"error":"ShellError: Shell command failed\n at Object.call (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1513:1326)\n at async L55 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1851:17667)\n at async KV1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1851:16256)\n at async q55 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1851:15588)\n at async $55 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1851:15526)\n at async ze (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1851:14499)\n at async ze (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1851:15129)\n at async bZ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2288:2064)","timestamp":"2025-06-03T05:50:34.596Z"},{"error":"ShellError: Shell command failed\n at Object.call (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1513:1326)\n at async L55 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1851:17667)\n at async KV1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1851:16256)\n at async q55 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1851:15588)\n at async $55 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1851:15526)\n at async ze (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1851:14499)\n at async bZ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2288:2064)","timestamp":"2025-06-03T05:51:11.708Z"},{"error":"SyntaxError: Unexpected token T in JSON at position 58\n at JSON.parse (<anonymous>)\n at s5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:557:9977)\n at tN2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1916:672)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-06-05T03:21:13.944Z"},{"error":"Error: Failed to generate conversation summary - response did not contain valid text content\n at CV1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1851:5838)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async KV2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1851:7892)\n at async ze (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1851:13591)\n at async bZ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2288:2064)","timestamp":"2025-06-05T03:45:16.539Z"},{"error":"Error: Failed to generate conversation summary -
Note: Error logs were truncated.