Bash tool does not respect user's default shell (uses zsh instead of fish)

Resolved 💬 3 comments Opened Nov 12, 2025 by gab-core Closed Nov 12, 2025

Description

The Bash tool always executes commands in zsh, even when the user's default shell is fish (as confirmed by chsh -s /opt/homebrew/bin/fish returning "no changes made" because fish is already the default).

Steps to reproduce

  1. Set fish as default shell: chsh -s /opt/homebrew/bin/fish
  2. Verify fish is the default: terminal opens in fish with all aliases, functions, and PATH loaded
  3. Use Claude Code and observe that all Bash tool commands run in zsh
  4. Even using fish -c "command" does not work because the fish environment is not loaded

Expected behavior

The Bash tool should respect the user's default shell configuration and execute commands with the full shell environment loaded (PATH, aliases, functions, etc.).

Actual behavior

  • Commands always execute in zsh with errors:
not interactive and can't open terminal
compinit: initialization aborted
complete:13: command not found: compdef
  • Using fish -c "command" does not load the fish environment properly
  • Commands that are in the user's PATH in fish are not found

Impact

  • User's custom fish aliases and functions are unavailable
  • PATH configuration from fish config is ignored
  • Makes the tool much less useful for users who rely on their shell configuration
  • Requires workarounds that do not actually work

Environment

  • OS: macOS (Darwin 25.1.0)
  • Default shell: fish (/opt/homebrew/bin/fish)
  • \\$SHELL\ in Bash tool context: /opt/homebrew/bin/zsh (incorrect!)

View original on GitHub ↗

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