[Bug] Anthropic API Error: Context Length Exceeded During Codebase Analysis
Bug Description
I don't think we're ready. Use Puppeteer and MCP to analyze the entire codebase
✻ Thinking…
The user wants to use Puppeteer and MCP to analyze the entire codebase before proceeding. This suggests they want a more thorough analysis. Let me update the todo list and then use the MCP tools to do a
comprehensive analysis of the codebase.
⏺ You're absolutely right to be thorough! Let me use Puppeteer and MCP tools to do a comprehensive analysis of the entire codebase before we proceed with selling.
✻ Thinking…
Let me first analyze the codebase using MCP filesystem tools to read multiple files at once, then use Puppeteer to test the actual functionality of the app.
⏺ 🔍 Comprehensive Codebase Analysis with MCP
★ Insight ─────────────────────────────────────
Using MCP's filesystem server and Puppeteer for automated testing ensures we catch any issues that manual testing might miss. This is especially important for a medical tool where reliability is critical.
─────────────────────────────────────────────────
Let me start by analyzing all the React components using MCP's filesystem tools:
⏺ filesystem - read_multiple_files (MCP)(paths: ["/Users/matthewscott/myelitis-dashboard/src/components/Dashboard.jsx","/Users/matthewscott/myelitis-dashboard/src/components/QuestionsHub.jsx","/Users/matthewscott
/myelitis-dashboard/src/components/ProviderLog.jsx","/Users/matthewscott/myelitis-dashboard/src/components/DailyMonitoring.jsx","/Users/matthewscott/myelitis-dashboard/src/
App.jsx","/Users/matthewscott/myelitis-dashboard/package.json"])
⎿ /Users/matthewscott/myelitis-dashboard/src/components/Dashboard.jsx:
import { useState, useEffect } from 'react';
import { Tab } from '@headlessui/react';
… +1013 lines (ctrl+r to expand)
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"input length and max_tokens exceed context limit: 198280 + 21333 > 200000, decrease input length or max_tokens and try
again"},"request_id":"req_011CSzYpdbp4ScGgoXXcZvMx"}
/feedback
⎿ Feedback / bug report cancelled
/feedback
⎿ Feedback / bug report submitted
We hit a snag/Users/matthewscott/Desktop/Screenshot\ 2025-09-10\ at\ 6.20.03 AM.png [I
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"input length and max_tokens exceed context limit: 199048 + 21333 > 200000, decrease input length or max_tokens and try
again"},"request_id":"req_011CSzZ37yTAJ41mLk2b5ueL"}
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 1.0.108
- Feedback ID: 4ab1d68d-c4de-404c-a2cb-1e97215dcd2a
Errors
[{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n at _V (file:///Users/matthewscott/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1726:1184)\n at file:///Users/matthewscott/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1726:912\n at Array.map (<anonymous>)\n at CX (file:///Users/matthewscott/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1726:903)\n at umB (file:///Users/matthewscott/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2875:9248)\n at lD (file:///Users/matthewscott/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:330:19415)\n at Hl (file:///Users/matthewscott/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:332:42814)\n at F9 (file:///Users/matthewscott/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:332:38355)\n at Tf (file:///Users/matthewscott/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:332:38283)\n at BC (file:///Users/matthewscott/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:332:38137)","timestamp":"2025-09-07T18:32:32.129Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n
Note: Error logs were truncated.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗