34 / Part 2. 公式機能

⑧-b OS別の前提:Windows は WSL2 を標準に

見落としがちな前提。Bash サンドボックスは macOS / Linux / WSL2 のみで、native Windows は非対応です。

OS managed 設定の配信 Bash サンドボックス(隔離)
macOS plist / ファイル ✓ Seatbelt 内蔵
Linux ファイル(/etc/claude-code) ✓ bubblewrap + socat
Windows(native) レジストリ HKLM/HKCU / ファイル ✗ 非対応 → WSL2 を使う
WSL2 /etc/claude-code(+Win継承可) ✓ 対応(WSL1 は不可)

強制Tips:sandbox.failIfUnavailable=true で“隔離必須”を hard gate 化/allowUnsandboxedCommands=false で escape 無効化。