claude-code - 💡(How to fix) Fix Feature request: Bash tool should respect user's configured shell

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

The Bash tool is hardcoded to bash, which breaks env inheritance for users whose primary shell is fish (or zsh, etc.).

Specifically, fish universal variables (set -Ux) are not visible to bash subprocesses, requiring awkward workarounds like wrapping every command in fish -c "...".

Root Cause

The Bash tool is hardcoded to bash, which breaks env inheritance for users whose primary shell is fish (or zsh, etc.).

Specifically, fish universal variables (set -Ux) are not visible to bash subprocesses, requiring awkward workarounds like wrapping every command in fish -c "...".

Fix Action

Workaround

fish -c "command" in every Bash tool call — functional but tedious, and non-interactive fish doesn't load universal vars either, so it doesn't fully solve the problem.

RAW_BUFFERClick to expand / collapse

Summary

The Bash tool is hardcoded to bash, which breaks env inheritance for users whose primary shell is fish (or zsh, etc.).

Specifically, fish universal variables (set -Ux) are not visible to bash subprocesses, requiring awkward workarounds like wrapping every command in fish -c "...".

Requested change

A configurable shell option (e.g. via CLAUDE_SHELL env var or settings), or a Shell tool that invokes the user's $SHELL instead of bash.

Concrete impact

Fish universal vars are the idiomatic persistence mechanism on fish systems. Any workflow involving env vars set via set -Ux requires fish -c wrappers throughout, adding friction and failure modes.

Example: setting HF_TOKEN via set -Ux HF_TOKEN ... is invisible to any bun, uv, or other subprocess launched via the Bash tool, even though those same commands work correctly from a fish terminal.

Workaround

fish -c "command" in every Bash tool call — functional but tedious, and non-interactive fish doesn't load universal vars either, so it doesn't fully solve the problem.

System

CachyOS (Arch-based), Fish 4.7.1, KDE Plasma 6 on Wayland

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Feature request: Bash tool should respect user's configured shell