[BUG] 0.2.39 broke bash commands
Status Fixed / completed
Maintainer reply ✓ Yes — wolffiex
Workaround ✓ Mentioned in thread ↓
Activity 15 comments · opened Mar 13, 2025 · closed Mar 14, 2025
💡 Likely answer: A maintainer (wolffiex, 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: 0.2.39 (Claude Code)
- Operating System: macOS 15.3.1
- Terminal: iterm2
Bug Description
The 0.2.39 broke bash command running, it waits forever before running the commands.
Bash(pnpm typecheck)…
✽ Doing… (65s · esc to interrupt)
Steps to Reproduce
- Ask to run some harmless bash command like
pnpm typecheckin my case.
Expected Behavior
Ask and run
Actual Behavior
Not asking and stalling
The only current way to fix it is to disable autoupdate and revert to 0.2.38
claude config set -g autoUpdaterStatus disabled
npm -g install @anthropic-ai/claude-code@0.2.38
15 Comments
I've noticed that it no longer seems to source
~/.bashrc@mavient the only workaround for me:
sorry to break this. we optimized the startup path but that caused problems for some rc files. we'll an attempt to get the best of both worlds in tomorrows release
So I realized now that my issue is slightly different, I'm trying to use
rbenvwithin the bash tool and it looks like the PATH is being manipulated such that the ~/.rbenv/shims/ directory is no longer high enough in the list to be used. @wolffiex can you share more about how this could work?@mavient this was working and it broke, or it never worked?
if your .zshrc/.bashrc exists we try and source it
yesterday I pushed an optimization that was obviously no good, it may be that sourcing your profile is now exiting because it is, say, hanging waiting for user input
I thought it was due to this bug as I only tried this yesterday. However
using 0.2.38 didn't fix it so now I don't think it ever worked.
I run fish and have a very simple .bashrc with just the rbenv init command
in it but the path still seems incorrect inside the tool. Anything else to
try?
On Thu, Mar 13, 2025 at 3:17 PM Adam Wolff @.***> wrote:
are you able to set the path with !
claude prefers zsh, check which shell it is actually using (it'll set $SHELL) and make sure you are editing the right rc file
@wolffiex I have everything important in .bash_profile, my .bashrc is this, but I don't see the echo lines.
But why does it need to source those? Isn't it just a subprocess under the current shell?
you wouldn't see the echo, that is ignored. this shouldn't be necessary as we start a login shell. did you have claude check which $SHELL it is using?
By asking it in English, or how?
yeah, "hey claude what shell are you running?"
@hyperknot we have a fix for some shell issues in v0.2.41
can you please let me know if this fixes your issue?
This fixed it, thanks! So it turns out it's running
zsh, so tried editing the.zshrcto include:Would be good to note that
.zshenvisn't used as that was my first attempt. Also would be good to describe exactly how $PATH is constructed as my rbenv shim path was in there but the order was all weird such that the system paths would override it.@wolffiex it is still broken.
When I ask it to tell me what shell I'm using, it's asking for permission to run
Bash(echo $SHELL), but then it doesn't do anything, keeps waiting infinitely.I still have to downgrade to 0.2.38 to make it work.
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.