Feature request: Use zsh (or login shell) for Bash tool on macOS

Status Fixed / completed
Maintainer reply None cached
Activity 4 comments · opened Apr 6, 2026 · closed Apr 6, 2026

macOS ships bash 3.2.57 (2007) due to GPLv3 licensing, and Apple will never update it — they switched the default shell to zsh back in Catalina (2019). The Bash tool currently hardcodes bash, which means on macOS you're stuck with a 19-year-old shell that lacks features like associative arrays (declare -A), mapfile, readarray, and other bash 4+ additions.

Since virtually every macOS user's login shell is zsh, it would make sense for the Bash tool to either:

  1. Use the user's configured login shell (from $SHELL or /etc/passwd), or
  2. At minimum, default to zsh on macOS

Related issues: #40653 (Bash tool ignores login shell), #31437 (bash 3.2 runtime issues)

This issue was raised with AI assistance (Claude Code).

View original on GitHub ↗

4 Comments

github-actions[bot] · 6 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/7490
  2. https://github.com/anthropics/claude-code/issues/34212
  3. https://github.com/anthropics/claude-code/issues/29358

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

LloydPowell771 · 6 months ago

Closing as duplicate of #7490. Upvoted there instead.

CervEdin · 6 months ago

FWIW, this https://github.com/anthropics/claude-code/issues/31437 is not a bash 3.2 runtime issue

github-actions[bot] · 6 months ago

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.