[Bug] Large file processing causes inefficient multi-round read cycles instead of single-pass analysis
Bug Description
Claude Code with the Opus latest model standard updated to the latest version Spent 30 minutes trying to read a conftest.py file that is 1400 lines long. This has occurred several times and at one time I waited for it to finish. It took 30 minutes. I asked it to split the file and it started reading it again and I interrupted it after 15 minutes. It shouldn't take so much time This is the discussion with Claude :
I'm not sure if this is a bug in the current Claude code because just opening a file conftest.py
shouldn't take 30 minutes but every time you do that it takes 30 minutes Can you explain this to
me?
⏺ You're right to question this. The Read tool itself is instant — reading a file takes milliseconds. The
"30 minutes" comes from my behavior, not a bug:
- The file is 69KB / 1631 lines — when I first read it, the output was "too large to include" and got
saved to a separate file
- So I read it in chunks — 100-200 lines at a time, multiple rounds
- Each round I analyze, then decide I need more context, then read more
- You interrupted several times (rightfully) because I was going in circles
So the problem is: a 1631-line file forces me into many sequential read-analyze-read cycles instead of
understanding it in one pass. Splitting it into ~300-400 line files means I can read each module in one
shot and work efficiently.
It's not a Claude Code bug — it's a large-file-in-context problem that makes me slow and inefficient.
The split you're asking for is the right fix.
Shall I proceed with writing the plan for the split and the other fixes?
❯ Now the file is not 1631 lines, it is 1469 lines. And it shall not take 30 minutes to check out if
you can split it. What are the circles you are going in? Describe to me so I understand?
⏺ You're right, 1469 lines. My mistake.
The circles I went in:
- First: Tried to read the whole file → output was "too large" (69KB)
- Then: Instead of just reading it in 2-3 chunks of 500 lines, I launched two Explore agents —
heavyweight and slow for what should be a quick scan
- You interrupted the agents
- Then: I read lines 1-100, processed them, then tried to read lines 100-300
- You interrupted again because at that point I'd been at it too long
The honest answer: I should have read lines 1-500, then 500-1000, then 1000-1469 — three quick reads,
done in 2 minutes. Instead I used the wrong tools (agents) and read in tiny 100-line chunks with
analysis pauses between each one.
There's no deep technical reason. I was just inefficient.
::: So the task a simple file split and this is obviously something that is not correct
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 2.1.56
- Feedback ID: 4c4476c5-072d-4d69-8287-68d28cce742f
Errors
[{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n at GQT (/$bunfs/root/claude:1809:15122)\n at async L (/$bunfs/root/claude:4088:16120)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-25T20:54:45.743Z"},{"error":"Error: Request was aborted.\n at makeRequest (/$bunfs/root/claude:306:3940)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-25T21:00:53.738Z"},{"error":"Error: Request was aborted.\n at makeRequest (/$bunfs/root/claude:306:3940)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-25T21:17:53.101Z"},{"error":"Error: Request was aborted.\n at ehR (/$bunfs/root/claude:819:96594)\n at next (native:1:11)\n at pR0 (/$bunfs/root/claude:5992:6662)\n at next (native:1:11)\n at nR0 (/$bunfs/root/claude:5997:9142)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-25T21:52:50.016Z"},{"error":"Error: EISDIR: illegal operation on a directory, read '/Users/mats/dev/ws_f/code/applications/accounting_visma/visma_accounting_service'\n at No_ (/$bunfs/root/claude:1646:248)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-25T22:09:27.925Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n at GQT (/$bunfs/root/claude:1809:15122)\n at async X (/$bunfs/root/claude:4088:15587)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-25T22:26:53.645Z"},{"error":"Error: Plugi…
Note: Content was truncated.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗