[BUG] when claude uses bash tool to grep a file that returns a single big line (1.5MB) will hang the app.
Resolved 💬 3 comments Opened Jan 16, 2026 by p0ns Closed Jan 20, 2026
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?
When Claude Code attempts to read a file with big lines (ex, big obfuscated js file with a single 1.5 mb line), Claude Code will hang.
What Should Happen?
It should detect there's too much context as it does for other tools
Error Messages/Logs
Let me search for more context about these APIs.
Bash(grep -B3 -A10 "GetNonWarehouseInventory\|GetStoreResultSet"
"/Users/pons/projects/***/js_app.js?v=202512092024" 2>/dev/null | head -100)
⎿ Running…
then it hangs
Steps to Reproduce
Create a file with a single line of 1.5mb
Get claude code to use grep to read the file
Claude Code will hang
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.9
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗