[BUG] Bash commands hang indefinitely in VSCode
Status Fixed / completed
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 5 comments · opened Dec 9, 2025 · closed Dec 9, 2025
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?
All bash commands hang indefinitely
VSCode integrated terminal works
VSCode Remote-SSH environment
Extension version 2.0.62
CLAUDE_BASH_NO_LOGIN=1 doesn't help
Remote host: RHEL-based Linux
What Should Happen?
Claude should be able to run commands through bash on the remote environment
Error Messages/Logs
Steps to Reproduce
I do not know if this is reproducible for others. I worked with Claude itself on debugging and Claude asked me to file this report.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.58
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
Other
Additional Information
_No response_
5 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
I had a similar issue and after quite a lot of debugging, I realized that it was my bash profile setup that caused the issue. I'll add the summary we created after that here, in case it might be the same issue.
The key takeaway: Have Claude look into shell startup issues.
Claude Code Bash Delays: Root Cause & Resolution
Summary
Claude Code bash commands hanging indefinitely in GitHub Codespaces was caused by dotfiles shell configuration, not a Claude Code bug.
Root Cause
.bash_profilecontainedexec /bin/zsh -lwithout an interactive shell guard:exec /bin/zsh -lcaused bash to immediately replace itself with zshFix
Add interactive shell guard in
.bash_profile:Key Lessons
Debugging Approach That Worked
Obsolete Workarounds (No Longer Needed)
The following workarounds were developed before root cause was found — they're unnecessary now:
.claude/settings.local.jsonThanks - yeah this wasn't the problem. I also assumed it was a shell/profile/rc problem, but after debugging for an hour with Claude helping me, I don't believe that's the case anymore. We set things up to use an incredibly minimal .bashrc and it's still hanging (even with full VSCode reload, etc.).
I'm not sure this is gonna be helpful, so closing. I'm going to try to reproduce more reliably.
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.