Setup フックが CLAUDE_ENV_FILE に書き込んだ変数が Bash ツールに渡らない問題を修正した英語原文を表示英語原文を閉じる
Setup hook writes to CLAUDE_ENV_FILE not reaching the Bash tool in some cloud sessions関連ドキュメント
Claude Code が各 Bash コマンドの前に同じシェルプロセス内で実行するシェルスクリプトのパスであり、ファイル内の export がコマンドから参照できる。virtualenv や conda のアクティベーションをコマンドをまたいで保持するのに使う。v2.1.296 以降、PowerShell コマンドも Persisted variables in PowerShell commands の条件の下でこの変数を受け取る。SessionStart・Setup・CwdChanged・FileChanged フックによっても動的に値が設定される。
Path to a shell script whose contents Claude Code runs before each Bash command in the same shell process, so exports in the file are visible to the command. Use to persist virtualenv or conda activation across commands. PowerShell commands receive its variables too, in v2.1.296 or later, under the conditions in Persisted variables in PowerShell commands. Also populated dynamically by SessionStart, Setup, CwdChanged, and FileChanged hooks
Setup フックが CLAUDE_ENV_FILE に書き込んだ変数が Bash ツールに渡らない問題を修正したSetup hook writes to CLAUDE_ENV_FILE not reaching the Bash tool in some cloud sessions関連ドキュメント
関連ドキュメント
/resume または /branch の後に、SessionStart フックが CLAUDE_ENV_FILE に書き込んだ変数が Bash ツールに渡らない問題を修正したCLAUDE_ENV_FILE not reaching the Bash tool after an in-app /resume or /branchCLAUDE_ENV_FILE を利用した SessionStart フックによる環境変数が、セッション再開やクリア後に無効になる問題を修正しました。CLAUDE_ENV_FILE SessionStart hooks going stale after /resume or /clear変更後
ツール実行に必要な環境変数を一度設定すれば、セッションの状態が変わっても一貫して使い続けることができます。
関連ドキュメント
CLAUDE_ENV_FILE および SessionStart フックで生成された環境変数が正しく適用されるようになりました。CLAUDE_ENV_FILE and SessionStart hook environment files now apply (previously a no-op)変更後
Windows開発者も、プロジェクト開始時にPythonの仮想環境を自動でアクティベートするといった効率化の恩恵を受けられます。
関連ドキュメント
CLAUDE_ENV_FILE(例:~/.zprofile)が末尾に「#」コメント行で終わる場合にBashツールの出力が空になる問題を修正CLAUDE_ENV_FILE (e.g. ~/.zprofile) ends with a # comment line変更後
特定のシェル設定環境下でツールが故障する原因が解消され、シェル環境の自由度が向上します。
関連ドキュメント