Bash tool hangs with heredoc in chained command

Resolved 💬 3 comments Opened Feb 11, 2026 by vekinox Closed Feb 15, 2026

Description

Bash tool hangs when using a heredoc inside a &&-chained command. The command never completes.

Repro

This command hangs indefinitely:

git add file1 file2 && git commit -m "$(cat <<'EOF'
refactor: rename old_field_name

- Renamed to new_field_name for clarity
- Updated tests and docs
EOF
)"

Workaround

Using multiple -m flags works fine:

git add file1 file2 && git commit -m "refactor: rename old_field_name" -m "- Renamed to new_field_name for clarity"

Environment

  • Claude Code 2.1.39
  • macOS (Darwin 24.6.0)

View original on GitHub ↗

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