[BUG] PATH exports in shell config files ignored by Claude Code VS Code extension

Resolved 💬 11 comments Opened Mar 14, 2026 by Atcold Closed Apr 13, 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?

The Claude Code VS Code extension does not pick up PATH exports from shell config files (.bashrc, .profile). Binaries installed via Homebrew (or other package managers) are therefore not found by the Bash tool.

After investigation, the root cause is that Claude Code captures a shell snapshot at startup (~/.claude/shell-snapshots/). This snapshot sources .bashrc and .profile for aliases and functions, but takes PATH from VS Code's process environment — which is set by path_helper reading /etc/paths and /etc/paths.d/, not from shell config exports.

As a result, any export PATH=... in .bashrc or .profile is silently ignored.

What Should Happen?

PATH exports in .bashrc and .profile should be reflected in the shell snapshot, so that binaries available in the user's terminal are also available to Claude Code's Bash tool.

Workaround

Register the missing paths at the path_helper level (macOS):

sudo sh -c 'printf "/opt/homebrew/bin\n/opt/homebrew/sbin\n" > /etc/paths.d/homebrew'

View original on GitHub ↗

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