[BUG] Claude Code hangs indefinitely on folder with large single-file HTML (~761KB with 200K-char lines)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Claude Code becomes completely unresponsive when opened in a directory containing large single-file HTML files with very long lines. No output is produced — no thinking indicator, no error message, no response at all. The input field accepts text but nothing happens.
Environment
Claude Code version: 2.1.76 → updated to 2.1.78, issue persists on both
Claude Desktop App: latest (as of March 19, 2026)
OS: macOS (Sequoia)
Model tested: Opus 4.6 (1M context) and Sonnet 4.6 — both hang
What Should Happen?
Claude Code should respond to messages, potentially warning about large files or using .claudeignore to skip them.
What Actually Happened
Zero response. No thinking indicator, no streaming, nothing.
The UI accepts input but produces no output.
Tried multiple fresh sessions — all hang immediately.
Killing the app, restarting the system, updating Claude Code — none resolved it.
Error Messages/Logs
ero response. No thinking indicator, no streaming, nothing.
The UI accepts input but produces no output.
Tried multiple fresh sessions — all hang immediately.
Killing the app, restarting the system, updating Claude Code — none resolved it.
Steps to Reproduce
Create a directory with a single-file HTML dashboard (~761KB, 7149 lines)
The HTML file contains inlined Chart.js and all CSS/JS — resulting in lines up to 199,933 characters long
Open the directory in Claude Code (via Desktop app Code tab)
Type any message and press Enter
Claude Code produces no output — completely frozen
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.78
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
File Details
public/index.html — 761KB, 7149 lines
Key long lines:
Line 20: 199,933 chars (inlined Chart.js library)
Line 1646: 46,466 chars
Line 1539: 35,191 chars
Line 1544: 19,114 chars
Line 1711: 14,267 chars
Total files in directory (excluding node_modules): 16
Total directory size: ~11MB (7.8MB is node_modules)
Workarounds Attempted (none worked)
Key Observation
Claude Code works fine when opened in other directories on the same machine. The hang is specific to this directory and persists even when the folder is copied to a new location, suggesting the issue is with the folder's contents rather than path or system state.
Expected Behavior
.claudeignore should prevent Claude Code from indexing/tokenizing ignored files on startup
Files with extremely long lines (100K+ chars) should be handled gracefully — skipped, truncated, or warned about
Claude Code should not hang silently; it should show an error or timeout message
Additional Context
The project is a Netlify static site deployment — a single-file HTML dashboard with all dependencies inlined. This is a common pattern for static site deployments. The inlined Chart.js on line 20 (199K chars) is the most likely trigger, but .claudeignore excluding this file did not help.
<img width="1162" height="900" alt="Image" src="https://github.com/user-attachments/assets/b418f83f-9c5c-4dc0-bd03-d7386b7d5bde" />
<img width="514" height="614" alt="Image" src="https://github.com/user-attachments/assets/881ca93d-6d7b-49c5-a633-29e62d98f5ef" />
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗