[BUG] Certain `/` commands are hanging perpetually in the background

Resolved 💬 3 comments Opened Sep 30, 2025 by drewmclean Closed Jan 8, 2026

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

  1. Make changes to files in a git repository
  2. In Claude Code session, run /commit command
  3. Observe "commit is running..." message appears
  4. Wait indefinitely - command never completes
  5. Check git status - no commit was created
  6. Check processes: ps aux | grep git - no git processes running
  7. Must cancel or restart Claude Code session to recover

Alternative reproduction:

  1. Make changes to files
  2. Run /commit with custom message: /commit "Fix bug in feature X"
  3. Same result - hangs indefinitely with "commit is running..." message

Expected Behavior

  • /commit command 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 /commit command at all
  • Must manually run git add and git commit via Bash tool as workaround
  • Loss of convenience features like automatic commit message generation
  • Breaks workflow for users who rely on slash commands

Timeline

  • Before: /commit command worked correctly in previous Claude Code version
  • After: Updated to Claude Code 2.0.1, /commit command 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:

  1. How the command spawns git processes
  2. Whether it's waiting for input that never arrives
  3. Timeout/cancellation mechanisms
  4. Any changes to commit flow between versions

This makes the /commit command unusable in the current version.

commit.md

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

  1. Add settings to user scope
  2. Add command to user scope
  3. Run a claude session
  4. 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

commit.md
settings.json

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗