[BUG] VSCode extension fails to load .zshrc file

Resolved 💬 5 comments Opened Nov 14, 2025 by Kentzo Closed Jan 16, 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?

Claude Code extension for VSCode cannot execute "Bash" commands because it fails to read _.zshrc_ and set environment variables.

Whenever it needs to run a shell command that needs an executable it outputs an error. E.g. for env:

IN: env
OUT: Exit code 127
(eval):1: command not found: env

But builtin shell commands (such as echo or print) do work:

IN: echo $PATH
OUT: 0

In the output for Claude VSCode I see the following message:

2025-11-14 08:53:04.787 [info] From claude: [DEBUG] Looking for shell config file: /Users/kentzo/.zshrc
[DEBUG] Shell config file not found: /Users/kentzo/.zshrc, creating snapshot with Claude Code defaults only
[DEBUG] Snapshots directory: /Users/kentzo/.claude/shell-snapshots

The _/Users/kentzo/.zshrc_ indeed does not exist. The proper location is _/Users/kentzo/.config/zsh/.zshrc_.

I have ZDOTDIR set such that every process in the system can see it. Claude.app, calude shell command, VSCode's terminal and extensions as well as other editors like Zed (including its Claude integration) do not have problems locating this file.

I tried setting ZDOTDIR in _~/.claude.json_ but it didn't help.

What Should Happen?

The extension should respect the value of ZDOTDIR.

Error Messages/Logs

2025-11-14 08:53:04.787 [info] From claude: [DEBUG] Looking for shell config file: /Users/kentzo/.zshrc
[DEBUG] Shell config file not found: /Users/kentzo/.zshrc, creating snapshot with Claude Code defaults only
[DEBUG] Snapshots directory: /Users/kentzo/.claude/shell-snapshots

Steps to Reproduce

Move .zshrc to a custom directory and set ZDOTDIR.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.37 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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