環境変数

CLAUDE_CODE_TMPDIR

内部の一時ファイルで使用されるディレクトリのパスを上書きします。

使い方・用途

  • OS のデフォルトの一時ディレクトリ(/tmp 等)が制限されている環境や、特定のディレクトリにファイルをまとめたいカスタム要件がある場合に役立ちます。
英語原文(公式ドキュメントより)

Override the temp directory used for internal temp files. Claude Code appends /claude-{uid}/ (Unix) or /claude/ (Windows) to this path. Default: /tmp on macOS, os.tmpdir() on Linux/Windows

関連する変更履歴

v2.1.5 (1件)

Added
内部の一時ファイルで使用される一時ディレクトリを上書きするためのCLAUDE_CODE_TMPDIR環境変数を追加しました。これは、カスタムの一時ディレクトリ要件がある環境で役立ちます。
英語原文を表示
Added CLAUDE_CODE_TMPDIR environment variable to override the temp directory used for internal temp files, useful for environments with custom temp directory requirements

関連ドキュメント