[BUG] Claude code unusable on MacOS, can't run any bash command
Resolved 💬 18 comments Opened Jul 3, 2025 by svallory Closed Feb 27, 2026
💡 Likely answer: A maintainer (ant-kurt, collaborator)
responded on this thread — see the highlighted reply below.
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: All latest versions (for each install mode) tried. Currently on 1.0.38 native
- Operating System: macOS Sonoma 14.7.4 (23H420)
- Terminal: iTerm2 and Terminal
- shell: tried on ZSH and Bash
Bug Description
I cannot run
Steps to Reproduce
- Start claude code
- run
! lsor ask Claude to run it
Expected Behavior
Command runs
Actual Behavior
Command times out in 2 minutes
Additional Context
Settings:
{
"permissions": {
"allow": [
"Bash",
"Bash(*)",
"Bash(*:*)"
],
"deny": []
}
}
18 Comments
Hi @svallory - can you try running with env var
ANTHROPIC_LOG=debug, and see if there are failing calls to the small, fast model? There's a preflight check that needs to pass before bash commands will execute.Related https://github.com/anthropics/claude-code/issues/1378#issuecomment-2941753236
Hi @ant-kurt here's what I see:
FYI: I ended up creating a Ubuntu virtual machine and connecting cursor to it via SSH. Claude code runs fine in there, so it looks like the issue is related to something on my environment. The problem is that the logs don't give me a clue of what it may be.
Wild guess:
catis an alias forbatwith automatic paging, so calling it would never finish. In fact, I have many commands aliased.It is very likely an issue caused by an alias to some command. I just tried running claude code as another user and commands worked again.
UPDATE: nevermind, I removed all the aliases from my user's env and the issue persists
I had similar issue and for me it was because claude code was using zsh (using the SHELL environment variable)
When I ran claude with
``
SHELL=/bin/bash claude``the commands work again.
Is Claude Code hard coded to use bash shell commands? Maybe it should always use /bin/bash instead of what's in SHELL
was having the same issue. SHELL=/bin/bash claude fixed this for me.
SHELL=/bin/bash claudedoesn't fix the issue on my side. Also, this only affect MacOS, it works fine on my linux computer.Having the same issue here.
I tried with
SHELL=/bin/bash claudewithout success.Having same problem in MacOS. I'm swearing hard
I am also hitting this, not sure how to work around it...
On at least a few occasions, I checked
/contextand found I had hit the limit of the window. GitHub alone was using 100K tokens. I had some calls to MCP servers fail as well, and I think the cause of that was Claude's client timing out.I just newly encountered this issue on the native claude code cli on arch linux
https://github.com/anthropics/claude-code/issues/2958#issuecomment-3164443934
did resolve the issue for me.
I've been running in zsh for as long as I've used claude, interestingly.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
I am still encountering this issue on claude code
2.0.76on linux6.18.2-arch2-1in zsh.Edit:
SHELL=/bin/bashdoes continue to alleviate the issue in my case.I am experiencing the same issues,
2.0.75on macos. Using ZSH, theSHELL=/bin/bashdoes not work.Same issue, M1 Pro with macOS 15.6.1, Claude 2.1.0,
SHELL=/bin/bashdoes not work.Edit: ironically, claude was able to figure out the reason:
Not sure why I had that there in the first place, but after removal, bash commands are running just fine.
Related issue 19663. Still occurs in Claude Code v2.1.19, on latest macOS.
Bash Tool Returns No Output on macOS
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
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.