Invalid JSON Response Parsing Error

Resolved 💬 3 comments Opened Mar 21, 2025 by muhammad-ahmed-srti Closed Nov 29, 2025

Bug Description
Getting API Error: Unexpected non-whitespace character after JSON at position 100

Environment Info

  • Platform: macos
  • Terminal: iTerm.app
  • Version: 0.2.52
  • Feedback ID: 0b21c9f7-eeb4-4f70-b8d8-56728999d467

Errors

[{"error":"Error: File content (23994 tokens) exceeds maximum allowed tokens (20000). Please use offset and limit parameters to read specific portions of the file, or use the GrepTool to search for specific content.\n    at Jj5 (file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1353:2013)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async Object.call (file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1353:1090)\n    at async iL5 (file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1261:13285)\n    at async FM1 (file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1261:11875)\n    at async jQ2 (file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:571:668)\n    at async pL5 (file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1261:11226)\n    at async JM1 (file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1261:11047)\n    at async wz (file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1261:10626)\n    at async wz (file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1261:10892)","timestamp":"2025-03-21T10:55:52.326Z"},{"error":"Error: File content (52134 tokens) exceeds maximum allowed tokens (20000). Please use offset and limit parameters to read specific portions of the file, or use the GrepTool to search for specific content.\n    at Jj5 (file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1353:2013)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async Object.call (file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1353:1090)\n    at async iL5 (file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1261:13285)\n    at async FM1 (file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1261:11875)\n    at async jQ2 (file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:571:668)\n    at async pL5 (file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1261:11226)\n    at async JM1 (file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1261:11047)\n    at async wz (file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1261:10626)\n    at async wz (file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1261:10892)","timestamp":"2025-03-21T11:04:59.738Z"},{"error":"Error: File content (24811 tokens) exceeds maximum allowed tokens (20000). Please use offset and limit parameters to read specific portions of the file, or use the GrepTool to search for specific content.\n    at Jj5 (file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1353:2013)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async Object.call (file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1353:1090)\n    at async iL5 (file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1261:13285)\n    at async FM1 (file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1261:11875)\n    at async jQ2 (file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:571:668)\n    at async pL5 (file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1261:11226)\n    at async JM1 (file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1261:11047)\n    at async wz (file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1261:10626)\n    at async wz (file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1261:10892)","timestamp":"2025-03-21T11:05:15.062Z"},{"error":"Error: Unexpected non-whitespace character after JSON at position 100\n    at file:///Users/muhammad.ahmed/.nvm/versions/node/v20.19.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:515:22596\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-03-21T12:19:27.335Z"}]

View original on GitHub ↗

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