[BUG] E2BIG Error in Bash Tool
Status Fixed / completed
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 11 comments · opened Jul 17, 2025 · closed Jul 17, 2025
Bug Description
Claude gets these errors when trying to rm files/folders, but if i execute them it works
● Bash(find /home/newt/Luninora/backend/tests -name "*.test.ts" -type f -exec rm {} \;)
⎿ Error: spawn E2BIG
● Bash(rm -rf /home/newt/Luninora/backend/tests/services)
⎿ Error: spawn E2BIG
● Bash(rm -rf /home/newt/Luninora/backend/tests/integration)
⎿ Error: spawn E2BIG
● Bash(rm -rf /home/newt/Luninora/backend/tests/*)
⎿ Error: spawn E2BIG
Environment Info
- Platform: linux
- Terminal: vscode
- Version: 1.0.54
- Feedback ID: 9f41e0ec-a69d-4a7a-b828-4a11d04fe7a2
Errors
[{"error":"Error: Request was aborted.\n at c$.makeRequest (file:///home/newt/.bun/install/global/node_modules/@anthropic-ai/claude-code/cli.js:1199:3840)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-07-17T12:43:25.853Z"}]
11 Comments
Claude Code Bug Report: E2BIG Error in Bash Tool
Summary
The Bash tool in Claude Code consistently fails with
spawn E2BIGerror for all commands, regardless of complexity.Environment
/home/newt/LuninoraIssue Description
All Bash tool invocations fail with
spawn E2BIGerror, including the simplest commands likeecho "test",whoami, anddate. The error occurs immediately upon tool invocation, suggesting an environment-related issue rather than command-specific problems.Steps to Reproduce
Commands Tested (All Failed)
Expected Behavior
Bash commands should execute successfully and return expected output.
Actual Behavior
All Bash tool invocations fail with:
Workarounds Used
Writetool to create files (automatically creates directory structure)LS,Read,Grep,Globtools for file operationsTechnical Analysis
The
E2BIGerror typically indicates:ARG_MAXSince even minimal commands fail, the issue appears to be with the Bash tool's environment setup rather than specific command execution.
Impact
Additional Context
System Information
This may be relevant for debugging the environment setup:
Request
Please investigate the Bash tool's environment setup and process spawning mechanism to identify why all commands fail with E2BIG error.
Same issue — any Bash command executed via ! blocks results in a spawn E2BIG error.
Error: Bash command failed for pattern "!git status": [stderr] spawn E2BIGEnvironment Info
I just started getting the same issue. Restarting the shell and a new Claude code session didn't help. Claude told me this: - Basic commands like pwd and ls fail with "spawn E2BIG"
shows 2097152)
I am also facing the same issue; restarted wsl, windows, claude nothing is working. Bash commands are not working. Other commands like Write, Read etc are fine. Even
Bash(ls)type simple commands are not working.Was facing the same issue, looks like 1.0.54 was broken. They revert to 1.0.53
claude updatefixed the issue
Works for me too, thanks @herculan0
Interesting. Claude update works for me also, however it says I'm now using 1.0.54
Okey thats weird, for me its 1.0.53 🤔 and another update says that 53 is the newest one
same issue, did an upgrade and it rolled back and working again.
Current version: 1.0.54Checking for updates...
npm info using npm@10.8.2
npm info using node@v18.20.8
npm info ok
New version available: 1.0.53 (current: 1.0.54)
Installing update...
Using local installation update method...
Successfully updated from 1.0.54 to version 1.0.53
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.