You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/collections/blog/2026/03-09-why-claude-code-cant-find-your-tools/index.mdx
+20-20Lines changed: 20 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -166,7 +166,7 @@ zsh -i -c 'which node'
166
166
<p>Run <code>zsh -c 'which gh'</code> (no <code>-i</code> flag). If this fails but <code>which gh</code> in your normal terminal works, your PATH is only set in <code>{"~/.zshrc"}</code>. Move the relevant exports to <code>{"~/.zshenv"}</code> to fix it.</p>
167
167
</Callout>
168
168
169
-
<h2>The Fix: Move PATH Exports to <code>{"~/.zshenv"}</code></h2>
169
+
<h2>The Fix: Move PATH Exports to ~/.zshenv</h2>
170
170
171
171
<p>
172
172
The solution is straightforward: any environment variable that must be visible to all processes — including non-interactive subshells — belongs in <code>{"~/.zshenv"}</code>, not <code>{"~/.zshrc"}</code>.
@@ -232,27 +232,27 @@ zsh -c 'which node'
232
232
233
233
<Callouttype="tip"title="Guiding principle">
234
234
<p>If it is an environment variable that a program needs to find another program, it belongs in <code>{"~/.zshenv"}</code>. If it is a user-facing customization for your interactive terminal experience, it belongs in <code>{"~/.zshrc"}</code>.</p>
235
-
236
-
<p><strong>Keep in <code>{"~/.zshenv"}</code>:</strong></p>
237
-
<ul>
238
-
<li><code>PATH</code> exports and modifications</li>
239
-
<li><code>GOPATH</code>, <code>JAVA_HOME</code>, <code>PYTHONPATH</code>, <code>CARGO_HOME</code>, and similar tool-specific env vars</li>
240
-
<li><code>NVM_DIR</code>, <code>PYENV_ROOT</code>, <code>RBENV_ROOT</code> and their <code>PATH</code> injections</li>
0 commit comments