[BUG] Certain `/` commands are hanging perpetually in the background
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?
Bug Report: /commit Slash Command Hanging Indefinitely in Claude Code 2.0.1
Summary
After updating to Claude Code 2.0.1, the /commit slash command hangs indefinitely without completing or providing feedback. The command appears to start but never finishes, requiring manual process termination.
Environment
- Claude Code Version: 2.0.1
- OS: macOS (Darwin 25.0.0)
- Platform: iOS development (Xcode project)
Steps to Reproduce
- Make changes to files in a git repository
- In Claude Code session, run
/commitcommand - Observe "commit is running..." message appears
- Wait indefinitely - command never completes
- Check
git status- no commit was created - Check processes:
ps aux | grep git- no git processes running - Must cancel or restart Claude Code session to recover
Alternative reproduction:
- Make changes to files
- Run
/commitwith custom message:/commit "Fix bug in feature X" - Same result - hangs indefinitely with "commit is running..." message
Expected Behavior
/commitcommand should analyze changes- Should run SwiftFormat (if configured)
- Should create a git commit with generated or custom message
- Should complete within reasonable time (< 30 seconds typically)
- Should show commit hash/confirmation when complete
- Should fail gracefully with error message if issues occur
Actual Behavior
- Command shows initial "commit is running..." message
- No further output or progress updates
- No git commit is created
- No SwiftFormat runs
- No timeout occurs
- No error messages displayed
- Command hangs indefinitely until manually cancelled
Impact
- Cannot use
/commitcommand at all - Must manually run
git addandgit commitvia Bash tool as workaround - Loss of convenience features like automatic commit message generation
- Breaks workflow for users who rely on slash commands
Timeline
- Before:
/commitcommand worked correctly in previous Claude Code version - After: Updated to Claude Code 2.0.1,
/commitcommand hangs on every attempt - Attempts: Tried multiple times across different sessions - 100% reproduction rate
Workaround
Use direct git commands via Bash tool:
git add -A
git commit -m "Commit message"
This works correctly, confirming the issue is specific to the slash command system, not git itself.
Additional Investigation
Configuration Checked
- No git hooks configured that could be blocking
- Settings file shows empty hooks:
"hooks": {} - Pre-commit hooks run successfully when using direct
git commit - Direct git operations work fine
Process State
When /commit runs, no git processes are spawned:
$ ps aux | grep git
# No git processes found during hang
What Changed
User reports: "They were all working before I updated to the latest claude code"
Request
Please investigate the /commit slash command execution in Claude Code 2.0.1, particularly:
- How the command spawns git processes
- Whether it's waiting for input that never arrives
- Timeout/cancellation mechanisms
- Any changes to commit flow between versions
This makes the /commit command unusable in the current version.
What Should Happen?
Claude should execute the command
Error Messages/Logs
> /commit is running… <message>
⎿ Allowed 4 tools for this command
⏺ The /commit command is running with your custom message. Let me wait for it to complete - hopefully it won't
hang this time.
Steps to Reproduce
- Add settings to user scope
- Add command to user scope
- Run a
claudesession - Run
/commit
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.0.0
Claude Code Version
2.0.1 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗