CLAUDE_CODE_WARN_DISK_FREE_GIB
環境変数
10 のような GiB 単位の整数を設定すると、作業ディレクトリのファイルシステムの空き容量がその量を下回ったときに、Claude Code が Claude に警告する。警告は空き容量の大きさを伝えるシステムリマインダーである。変数が未設定、0、または数字のみでない場合、リマインダーは無効になる。settings の env ブロック経由で渡されたコピーは無視されるため、Claude Code を起動する環境に設定すること。Claude Code v2.1.304 以降が必要
使い方・用途
- 作業ディレクトリのファイルシステムの空き容量が指定した GiB 数を下回ったときに Claude へ警告を出させ、ディスク枯渇による作業中断を未然に防ぎたいときに使う。
英語原文
Set to a whole number of GiB, such as 10, to have Claude Code warn Claude when free space on the working directory's filesystem falls below that amount. The warning is a system reminder saying how much is free. The reminder is off when the variable is unset, 0, or not plain digits. Set it in the environment that launches Claude Code, since Claude Code ignores a copy delivered through a settings env block. Requires Claude Code v2.1.304 or later