@omurice_brand PS C:\Users\hoge> wsl --update
Linux 用 Windows サブシステムの最新バージョンは既にインストールされています。
PS C:\Users\hoge> wsl --version
WSL バージョン: 3.0.3.0
$ uname -r
6.18.54.1-microsoft-standard-WSL2
github.com/microsoft/WSL/releases
現時点では 3.0.3 がLatestになっていますね…。
1 like · 131 views
Mirrored TCP fails after FSE HostVnic IPv4 rebind; stale IPS attachment state in paired dumps · Issue #42078 · microsoft/WSL
WSL#42078 t.co
1 like · 88 views
@loganaiyer Please look into this, this has been an issue since WSL2 launched and I'm pretty sure it existed long before as a bug in Hyper-V and its my strongest reason for wanting to make the move away from Windows for dev WSL#7178
62 views
I made WSL 2 boot my dual-boot Linux partition directly (same root, systemd, Docker, VS Code)
preview.redd.it
I dual boot Kubuntu (second NVMe) and Windows 11, and I wanted *one* Linux install: same home, packages and Docker data whether I boot it bare metal or open it from Windows. On a work laptop with two 256 GB SSDs, keeping a second full Linux inside an `ext4.vhdx` also eats space I don't have. Stock WSL can only boot a distro from an `ext4.vhdx`; `wsl --mount` attaches a disk but never as a distro root (#6290 has been open since 2020).
Since WSL is open source now, I patched it: the service attaches the authorized disk as PassThrough and `mini_init` mounts the GPT partition (found by PARTUUID, ext4 superblock checked) as the distro root before WSL's own init runs. Everything after that is stock WSL.
What works from a normal non-elevated session: `wsl -d`, `\\wsl.localhost` cold start, systemd, VS Code Remote WSL, Docker with localhost ports, WSLg (with audio — the screenshot is KDE's Konsole opened by WSLg), clean shutdown when Windows reboots, and the native boot is untouched.
It's six patches (~500 lines) on WSL 3.0.3 plus a systemd generator that masks desktop/network/hardware units only under WSL. No binaries — you build it. It boots a real disk read-write from a second kernel, so read the safety section first.
sottam/dualboot-linux-as-wsl
I also proposed it upstream: WSL#6290
Feedback welcome, especially from people with other distros/layouts.
59 points · 1 comment
下書きと作業記録を AI コーディングエージェントから守る:設定ではなく置き場所で(Claude Code・Windows)
この記事の範囲
私(著者・人間)は個人のリポジトリで、AI コーディングエージェントの Claude Code と一緒に、AI 駆動開発の実践ガイドを書いています(aidd-practice-guide)。この記事は、その中で起きた事と、今どう守っているかの記録です。
mryo0826/aidd-practice-guide
!
主語について: この記事の「私」は著者(人間)です。作業の多くは Claude Code と一緒にしていて、実測やファイルの調べは、私が Claude Code に頼んで走らせました。誰がしたかは、節毎に書き分けます。
守りたい物: 2つ有ります。
プロンプトの下書き: 私は、生成AI に渡す長い指示を、チャットの欄に直に打ちません。まず1つのテキストファイル(temp.md)に、見出しと箇条で組み立ててから渡しています。そのファイルです。
作業の記録: 次にやる事・判断の経緯・作業の現在地です。Claude Code が書き、私が読んで、直す所を Claude Code に指示します。
どちらも API キーの様な秘密ではありません。ただ、公開はしたくない物です。作業の記録は、1件ずつは無害でも、時系列で溜まると、書き手の稼働の傾向が見えてしまいます。
環境: ネイティブの Windows 11 で、Claude Code の CLI と VS Code の拡張を使っています。
結論を先に書くと: 「AI に読ませない」設定は破れたので、「公開しない」を置き場所(別の git リポジトリ)で守る形に変えました。そして「AI に読ませない」の方は、使い勝手との釣り合いで捨てました。自分の環境で確かめる事は、最後の「持ち帰り」の節に纏めています。
.env や鍵も、もちろん守っています。リポジトリには置かず(API キーは環境変数に置いています)、push の前には毎回、外に出る差分に鍵やトークンの形のパターンを当てて検査しています。非公開のリポジトリを公開に切り替える時は、履歴の全体に当てます。ただ、その守り方は既に多くの記事が書いているので、この記事では扱いません。この記事が扱うのは、秘密ではないが公開したくない作業記録の方です。
前提と用語
Claude Code: Anthropic の AI コーディングエージェント。手元のフォルダの中で、ファイルを読み書きし、コマンドを打ちます。読む手段は、組み込みのツール(Read・Grep 等)と、Bash や PowerShell のコマンドの2系統が有ります。
permissions の deny: Claude Code の設定(.claude/settings.json)で、ツールの呼び出しを拒否する決まりです。Read(./temp.md) と書くと、そのファイルを読む呼び出しを止めます。
サンドボックス: OS の側で、コマンドが読み書き出来る範囲を絞る仕組みです。Claude Code が動かすシェルのコマンドを覆います。
最初の守り方と、破れた所
最初は、下書きのファイルを公開リポジトリの中に置き、2つの設定で守っていました。
目的
掛けた設定
結果
公開しない
.gitignore で除外する
効いた(push されていない)
AI に読ませない
permissions の deny に Read(./temp.md) を書く
破れた
気付いたのは、私がリポジトリの監査を Claude Code に頼んだ時です。その Claude Code が使ったサブエージェントが、読ませない筈の下書きの中身を取れていました。経路毎に見ると、こうなっていました(2026 年 7 月に下書きを移すより前の事で、版の番号は記録に残っていません)。
経路
結果
Read のツール
止まった
Grep のツール
止まった
Bash(cat・wc・grep 等)
読めた
OS の側で塞ぐサンドボックスの設定(sandbox.filesystem.denyRead・sandbox.enabled)も試しましたが、変化は有りませんでした。公式の文書は今も、サンドボックスはネイティブの Windows では動かないと書いています。
The sandbox runs on macOS, Linux, and WSL2. On native Windows, Claude Code runs commands unsandboxed. To use the sandbox on a Windows machine, run Claude Code inside a WSL2 distribution.
— Sandboxing
損なわれたのは「AI の目に触れない」という保証だけで、公開の側は .gitignore で守れていました。
置き場所を変えた
そこで私は、下書きを公開リポジトリの外に移しました。移した先は、作業の記録を置く非公開の別リポジトリで、そこでも .gitignore で除外しています。
作業の記録の方にも、同じ形の失敗が有りました。最初は公開リポジトリの中で .gitignore によって除外していました。ところがこれだと、Claude Code が書き戻した内容を、私が差分で確かめられません。git の管理の外に置いた物は、レビューの外にも出てしまいます。今は、公開リポジトリの隣に並べた独立のリポジトリで git 管理しています。公開リポジトリとは、リンクやサブモジュールでは繋いでいません(置き場所の名前を、制御ファイルに1か所書いているだけです)。
~/.claude の設定のうち、公開して良い物は aidd-claude-home で公開しています。後の節で触れる「作業の記録を追加の作業ディレクトリに入れる」設定も、ここに在ります。
mryo0826/aidd-claude-home
ガイドの制御ファイル(CLAUDE.md)には、この判断をこう書いています。
機微なものは設定で守らず、置き場所で守る。(中略)設定や規律で塞ぐより、構造で成立させる方が強い。
今の版で測り直した
最初の観測から3か月経ち、Claude Code の権限の仕組みは変わっています(changelog)。そこで、2026-10-25 に、Claude Code v2.1.310(2026-10-23 のリリース)で、同じ事を測り直しました。
やり方: 私は、対話中の Claude Code に測定を頼みました。その Claude Code は、PowerShell から非対話の Claude Code(claude -p)を、読み方毎に1回ずつ起動しました。起動される側は毎回新しいセッションで、同じプロジェクトの設定を読みます。Claude Code の公式のサブエージェントの機能とは別物で、公式が勧めている使い方でもありません。読み方毎に、まっさらなセッションで1回ずつ試す為に、この形を取りました。
条件: Claude Code v2.1.310・ネイティブの Windows 11・一時のフォルダに作った小さなプロジェクト。notes/draft.md には意味の無い目印の文字列だけを書き、プロジェクトの .claude/settings.json に Read(./notes/**) の deny を書きました。
読み方
目印は漏れたか
Read のツール
漏れなかった
Bash の cat notes/draft.md
漏れなかった
PowerShell のツールの Get-Content notes/draft.md
漏れなかった
Grep のツールで目印を探す
漏れなかった(一致無しと返った)
Bash の grep -r CANARY .
漏れた
Bash の python -c "print(open('notes/draft.md').read())"
漏れた
当時は止まらなかった cat が、今は止まります。漏れた2つは、公式の文書が自分で書いている穴のとおりです。
Read and Edit deny rules apply to Claude's built-in file tools, to file commands Claude Code recognizes in Bash, such as cat, head, tail, sed, and tee, and to the targets of Bash redirections such as > file and < file. They don't apply to a command that reads files without naming them, such as grep -r pattern . run from the directory that holds the file, or to arbitrary subprocesses that read or write files indirectly, like a Python or Node script that opens files itself. For OS-level enforcement that blocks all processes from accessing a path, enable the sandbox.
— Configure permissions
文書の文面そのものも、この半年の間に変わっています。2026 年 4 月の記事が引いた当時の公式の文は「apply to Claude's built-in file tools, not to Bash subprocesses. A Read(./.env) deny rule blocks the Read tool but does not prevent cat .env in Bash.」でした。changelog を見ても、2.1.257 で Bash のリダイレクトと読み出しの命令にも deny が効く様になりました。その後、2.1.268 で入った変更は 2.1.273 で取り消されています。
⇒ 設定で守ると、版が変わる度に「今はどこまで塞げるか」を確かめ直す事になります。置き場所の効き目は、版に依りません。届くかどうかを決めるのは、自分の設定です(次の節)。
!
測ったのは各1回で、信頼していないフォルダでの claude -p です。この条件では、プロジェクトの設定の allow は無視され(起動の時に注意が出ます)、deny は効きました。Python の行は、allow を --allowedTools "Bash(python *)" で渡して測りました。対照として、deny を掛けていない README.md は、cat でも Get-Content でも読めました。表の「漏れなかった」は、deny で止まったものです。
目的を2つに分けた
置き場所を変えた後、私は、もう一歩、AI の届かない所へ下書きを出すかを考えました。そして、出さないと決めました。
「公開しない」は、置き場所で守れています。下書きは公開リポジトリに無く、非公開のリポジトリでも追跡していません。
「AI に読ませない」は、捨てました。判断の言葉はこうです。「commit されなければ、読まれても正直困らない」「使い勝手の方が重要」。
実際、今の私の環境では、Claude Code のユーザー設定で、作業の記録のリポジトリを追加の作業ディレクトリに入れています。どのフォルダで Claude Code を起動しても、作業の記録には届きます(上の測定でも、起動された Claude Code の作業ディレクトリに入っていました)。下書きの中身を Claude Code が読む事は、受け入れた上で使っています。
⇒ 守りたい物を1つの言葉で括ると、全部を設定で守ろうとして、どれも中途半端になります。目的を分けると、どの守りがどの目的に効いているか、どの目的を捨てたかが、自分で見える様になります。
手元の外で動かす場合(クラウドとコンテナ)
AI コーディングエージェントは、クラウドでも動く様になっています。Claude Code の cloud session は、指定したリポジトリを clone して動きます。
The cloud VM clones your current directory's GitHub remote at your current branch, not your local checkout, so push first if you have local commits.
--cloud works with a single repository at a time.
— Use Claude Code in the cloud
⇒ クラウドでも、境界は「どのリポジトリを渡すか」で決まります。別のリポジトリに置いた物は、渡さない限り届きません。
1つ注意が有ります。GitHub の remote が無い時等は、手元のリポジトリを束ねて送ります。macOS・Linux・WSL では、鍵らしい名前のファイルの未 commit の変更は外されます。ネイティブの Windows では、追跡しているファイルの未 commit の変更が、名前に関わらずそのまま送られます(同じ頁の「Send local repositories without GitHub」)。
コンテナでも、同じ考え方が効きました。
Docker のコンテナ(2026 年 8 月・WSL2 の rootless Docker・compose.yml で構成し、VS Code の Dev Containers で開いた): 私は、実演のリハーサルの為に、作業の記録を置かないコンテナを作り、その中で Claude Code を動かしました。その環境を作る中で、VS Code の Dev Containers が手元の git の資格情報をコンテナでも使える様にする事に気付きました。匿名の HTTPS で clone していても、公開リポジトリへ push が通り得ます。これは文書に書かれた仕様です。
If you use HTTPS to clone your repositories and have a credential helper configured in your local OS, no further setup is required. Credentials you've entered locally will be reused in the container and vice versa.
— Sharing Git credentials with your container
運用で気を付けるのではなく、コンテナの中の push 先の URL を無効な値に差し替えて塞ぎました(git remote set-url --push origin DISABLED-FOR-DEMO)。
WSL3 のコンテナ(wslc): 2026 年 9 月の WSL 3.0.1(リリースの見出しは「WSLc is generally available.」)で、WSL のコンテナの機能(WSL containers・wslc)が正式になりました(Microsoft の告知 WSL containers is now generally available・公式の文書 WSL container・日本語の報道は窓の杜の記事)。版の番号は 3 ですが、WSL の方式は今も WSL 1 と WSL 2 の2つです(Microsoft Learn の Comparing WSL 1 and WSL 2)。何も付けずに起動したコンテナからは、Windows 側のファイルは見えませんでした(/mnt は空で、マウントの行も無い)。この時に中で動かした AI のツールは Devin CLI で、Claude Code ではありません。
OS の側のサンドボックスを使うなら、公式が挙げているのは macOS・Linux・WSL2 です。Windows なら、WSL2 の中で Claude Code を動かす事になります。Docker Desktop や WSL3 のコンテナの中でサンドボックスが動くかは、私は確かめていません。
置き場所でも止まらない物
置き場所で守れるのは、AI ツールとリポジトリの経路だけです。人間が下書きを手で写して外の生成AI サービスに貼り、その会話を共有すれば、置き場所は何もしません。この経路を構造で止める手段を、私は持っていません。弱い守りを強い守りと思い込む方が危険なので、ここは限界として書いておきます。
持ち帰り: 自分の環境で確かめる事
公開したくない下書きや作業記録が、公開リポジトリの中に有りませんか。.gitignore で除外していても、AI ツールからは読めます。
permissions の deny は、層の1枚として扱っていますか。今の版でも、ファイルを名指さない読み(grep -r)と、自分でファイルを開くスクリプトには効きません。
ネイティブの Windows なら、サンドボックスは無い前提で考えていますか。OS の側で塞ぐなら、WSL2 等の Linux の環境の中で動かす事になります。
守りたい目的を分けていますか(公開しない/AI に読ませない)。捨てた目的が有るなら、それを自分で分かっていますか。
クラウドやコンテナで動かすなら、渡すリポジトリと、中継される資格情報を確かめましたか。
参考: 近い記事
置き場所を守りの土台に据える考え方は、私が最初ではありません。見つけた範囲で、近い記事を挙げます。
Claude Codeに見せない技術: 機密データをリポジトリの外の1箇所に置く事を、最も下の層(L0)に据え、その上に deny・サンドボックス・hooks を重ねています。この記事との違いは、守る物(機密データか、作業記録か)と、置く単位(ディレクトリか、別の git リポジトリか)です。
Claude Code Deny Rules Blocked Read(.env). Bash Read It Anyway: deny を掛けた上で6通りの読み方を試し、本当に機微な物は作業ディレクトリの外に置く、と結んでいます。
Claude Code の sandbox でも、.env は守れなくなくない?: MCP サーバーはサンドボックスの外で動く為、MCP 経由では読めてしまう事を示しています。公式の文書も「The sandbox covers shell commands only. Claude's file tools, MCP servers, and hooks run outside it.」と書いています。
Windows 上想用 Linux 命令,不想再装双系统?🐧
WSL 让你直接运行 Linux 命令行工具和发行版。学 Shell、做开发环境都方便。💻
microsoft/WSL
#Windows #浇朋友 #蓝朋友 #互关 #fo
1 like · 77 views
Is it accurate to call this WSL3? WSL 2 was released in 2019, but WSL 2.0.0 was released in 2023 github.com/microsoft/WSL/releases/tag/2.0.0
Great job in benchmarking! I wasn't even aware of the WSLc (WSL3) release. For others, the release info is available here: github.com/microsoft/WSL/releases/tag/3.0.1
EDIT: stumbled on the previous HN post here: news.ycombinator.com
WSL: Windows Subsystem for Linux (34k stars)
What it does
All text below is quoted directly from the project README.
>Windows Subsystem for Linux (WSL) is a powerful way for you to run your Linux command-line tools, utilities and applications, all unmodified and directly on Windows without the overhead of a traditional virtual machine or dual boot setup.
>You can install WSL right away by running this command inside of your Windows command line: wsl --install
Related repositories:
- microsoft/WSL2-Linux-Kernel - The Linux kernel shipped with WSL
- microsoft/WSLg - Support for Linux GUI apps in WSL
- microsoftdocs/wsl - WSL documentation at aka.ms/wsldocs
>This project welcomes contributions of all types, including coding features / bug fixes, documentation fixes, design proposals and more.
Repository
microsoft/WSL
Repository stats
|Metric|Value|
|:-|:-|
|Stars|33,968|
|Forks|1,850|
|Last release|3.0.1 (2026-09-29)|
|Languages|C++ 74.6%, C 21.6%, C# 1.4%|
|Contributors|139|
|AI contributor accounts (Claude / Codex / Cursor / Copilot)|Claude: 3, Copilot: 260|
|AI co-authored commits|Claude: 3, Copilot: 274|
Main contributor
|Field|Value|
|:-|:-|
|Name|Blue|
|GitHub|@OneBlue|
|Commits to this repo|452 (top contributor)|
|Bio|Open source enthusiast & WSL maintainer|
|Followers|126|
|Public repos|23|
|On GitHub since|2015-12-29|
34 points · 1 comment
🚀Microsoft ha lanzado WSL 3.0.2, incorporando vNUMA automático para máquinas virtuales grandes, lo que mejora el aprovechamiento de servidores con muchos núcleos y memoria.
github.com/microsoft/WSL/releases/tag/3.0.2
9 likes · 2 reposts · 749 views
Mentions
@omurice_brand PS C:\Users\hoge> wsl --update Linux 用 Windows サブシステムの最新バージョンは既にインストールされています。 PS C:\Users\hoge> wsl --version WSL バージョン: 3.0.3.0 $ uname -r 6.18.54.1-microsoft-standard-WSL2 github.com/microsoft/WSL/releases 現時点では 3.0.3 がLatestになっていますね…。
Mirrored TCP fails after FSE HostVnic IPv4 rebind; stale IPS attachment state in paired dumps · Issue #42078 · microsoft/WSL WSL#42078 t.co
@loganaiyer Please look into this, this has been an issue since WSL2 launched and I'm pretty sure it existed long before as a bug in Hyper-V and its my strongest reason for wanting to make the move away from Windows for dev WSL#7178
I made WSL 2 boot my dual-boot Linux partition directly (same root, systemd, Docker, VS Code) preview.redd.it I dual boot Kubuntu (second NVMe) and Windows 11, and I wanted *one* Linux install: same home, packages and Docker data whether I boot it bare metal or open it from Windows. On a work laptop with two 256 GB SSDs, keeping a second full Linux inside an `ext4.vhdx` also eats space I don't have. Stock WSL can only boot a distro from an `ext4.vhdx`; `wsl --mount` attaches a disk but never as a distro root (#6290 has been open since 2020). Since WSL is open source now, I patched it: the service attaches the authorized disk as PassThrough and `mini_init` mounts the GPT partition (found by PARTUUID, ext4 superblock checked) as the distro root before WSL's own init runs. Everything after that is stock WSL. What works from a normal non-elevated session: `wsl -d`, `\\wsl.localhost` cold start, systemd, VS Code Remote WSL, Docker with localhost ports, WSLg (with audio — the screenshot is KDE's Konsole opened by WSLg), clean shutdown when Windows reboots, and the native boot is untouched. It's six patches (~500 lines) on WSL 3.0.3 plus a systemd generator that masks desktop/network/hardware units only under WSL. No binaries — you build it. It boots a real disk read-write from a second kernel, so read the safety section first. sottam/dualboot-linux-as-wsl I also proposed it upstream: WSL#6290 Feedback welcome, especially from people with other distros/layouts.
下書きと作業記録を AI コーディングエージェントから守る:設定ではなく置き場所で(Claude Code・Windows) この記事の範囲 私(著者・人間)は個人のリポジトリで、AI コーディングエージェントの Claude Code と一緒に、AI 駆動開発の実践ガイドを書いています(aidd-practice-guide)。この記事は、その中で起きた事と、今どう守っているかの記録です。 mryo0826/aidd-practice-guide ! 主語について: この記事の「私」は著者(人間)です。作業の多くは Claude Code と一緒にしていて、実測やファイルの調べは、私が Claude Code に頼んで走らせました。誰がしたかは、節毎に書き分けます。 守りたい物: 2つ有ります。 プロンプトの下書き: 私は、生成AI に渡す長い指示を、チャットの欄に直に打ちません。まず1つのテキストファイル(temp.md)に、見出しと箇条で組み立ててから渡しています。そのファイルです。 作業の記録: 次にやる事・判断の経緯・作業の現在地です。Claude Code が書き、私が読んで、直す所を Claude Code に指示します。 どちらも API キーの様な秘密ではありません。ただ、公開はしたくない物です。作業の記録は、1件ずつは無害でも、時系列で溜まると、書き手の稼働の傾向が見えてしまいます。 環境: ネイティブの Windows 11 で、Claude Code の CLI と VS Code の拡張を使っています。 結論を先に書くと: 「AI に読ませない」設定は破れたので、「公開しない」を置き場所(別の git リポジトリ)で守る形に変えました。そして「AI に読ませない」の方は、使い勝手との釣り合いで捨てました。自分の環境で確かめる事は、最後の「持ち帰り」の節に纏めています。 .env や鍵も、もちろん守っています。リポジトリには置かず(API キーは環境変数に置いています)、push の前には毎回、外に出る差分に鍵やトークンの形のパターンを当てて検査しています。非公開のリポジトリを公開に切り替える時は、履歴の全体に当てます。ただ、その守り方は既に多くの記事が書いているので、この記事では扱いません。この記事が扱うのは、秘密ではないが公開したくない作業記録の方です。 前提と用語 Claude Code: Anthropic の AI コーディングエージェント。手元のフォルダの中で、ファイルを読み書きし、コマンドを打ちます。読む手段は、組み込みのツール(Read・Grep 等)と、Bash や PowerShell のコマンドの2系統が有ります。 permissions の deny: Claude Code の設定(.claude/settings.json)で、ツールの呼び出しを拒否する決まりです。Read(./temp.md) と書くと、そのファイルを読む呼び出しを止めます。 サンドボックス: OS の側で、コマンドが読み書き出来る範囲を絞る仕組みです。Claude Code が動かすシェルのコマンドを覆います。 最初の守り方と、破れた所 最初は、下書きのファイルを公開リポジトリの中に置き、2つの設定で守っていました。 目的 掛けた設定 結果 公開しない .gitignore で除外する 効いた(push されていない) AI に読ませない permissions の deny に Read(./temp.md) を書く 破れた 気付いたのは、私がリポジトリの監査を Claude Code に頼んだ時です。その Claude Code が使ったサブエージェントが、読ませない筈の下書きの中身を取れていました。経路毎に見ると、こうなっていました(2026 年 7 月に下書きを移すより前の事で、版の番号は記録に残っていません)。 経路 結果 Read のツール 止まった Grep のツール 止まった Bash(cat・wc・grep 等) 読めた OS の側で塞ぐサンドボックスの設定(sandbox.filesystem.denyRead・sandbox.enabled)も試しましたが、変化は有りませんでした。公式の文書は今も、サンドボックスはネイティブの Windows では動かないと書いています。 The sandbox runs on macOS, Linux, and WSL2. On native Windows, Claude Code runs commands unsandboxed. To use the sandbox on a Windows machine, run Claude Code inside a WSL2 distribution. — Sandboxing 損なわれたのは「AI の目に触れない」という保証だけで、公開の側は .gitignore で守れていました。 置き場所を変えた そこで私は、下書きを公開リポジトリの外に移しました。移した先は、作業の記録を置く非公開の別リポジトリで、そこでも .gitignore で除外しています。 作業の記録の方にも、同じ形の失敗が有りました。最初は公開リポジトリの中で .gitignore によって除外していました。ところがこれだと、Claude Code が書き戻した内容を、私が差分で確かめられません。git の管理の外に置いた物は、レビューの外にも出てしまいます。今は、公開リポジトリの隣に並べた独立のリポジトリで git 管理しています。公開リポジトリとは、リンクやサブモジュールでは繋いでいません(置き場所の名前を、制御ファイルに1か所書いているだけです)。 ~/.claude の設定のうち、公開して良い物は aidd-claude-home で公開しています。後の節で触れる「作業の記録を追加の作業ディレクトリに入れる」設定も、ここに在ります。 mryo0826/aidd-claude-home ガイドの制御ファイル(CLAUDE.md)には、この判断をこう書いています。 機微なものは設定で守らず、置き場所で守る。(中略)設定や規律で塞ぐより、構造で成立させる方が強い。 今の版で測り直した 最初の観測から3か月経ち、Claude Code の権限の仕組みは変わっています(changelog)。そこで、2026-10-25 に、Claude Code v2.1.310(2026-10-23 のリリース)で、同じ事を測り直しました。 やり方: 私は、対話中の Claude Code に測定を頼みました。その Claude Code は、PowerShell から非対話の Claude Code(claude -p)を、読み方毎に1回ずつ起動しました。起動される側は毎回新しいセッションで、同じプロジェクトの設定を読みます。Claude Code の公式のサブエージェントの機能とは別物で、公式が勧めている使い方でもありません。読み方毎に、まっさらなセッションで1回ずつ試す為に、この形を取りました。 条件: Claude Code v2.1.310・ネイティブの Windows 11・一時のフォルダに作った小さなプロジェクト。notes/draft.md には意味の無い目印の文字列だけを書き、プロジェクトの .claude/settings.json に Read(./notes/**) の deny を書きました。 読み方 目印は漏れたか Read のツール 漏れなかった Bash の cat notes/draft.md 漏れなかった PowerShell のツールの Get-Content notes/draft.md 漏れなかった Grep のツールで目印を探す 漏れなかった(一致無しと返った) Bash の grep -r CANARY . 漏れた Bash の python -c "print(open('notes/draft.md').read())" 漏れた 当時は止まらなかった cat が、今は止まります。漏れた2つは、公式の文書が自分で書いている穴のとおりです。 Read and Edit deny rules apply to Claude's built-in file tools, to file commands Claude Code recognizes in Bash, such as cat, head, tail, sed, and tee, and to the targets of Bash redirections such as > file and < file. They don't apply to a command that reads files without naming them, such as grep -r pattern . run from the directory that holds the file, or to arbitrary subprocesses that read or write files indirectly, like a Python or Node script that opens files itself. For OS-level enforcement that blocks all processes from accessing a path, enable the sandbox. — Configure permissions 文書の文面そのものも、この半年の間に変わっています。2026 年 4 月の記事が引いた当時の公式の文は「apply to Claude's built-in file tools, not to Bash subprocesses. A Read(./.env) deny rule blocks the Read tool but does not prevent cat .env in Bash.」でした。changelog を見ても、2.1.257 で Bash のリダイレクトと読み出しの命令にも deny が効く様になりました。その後、2.1.268 で入った変更は 2.1.273 で取り消されています。 ⇒ 設定で守ると、版が変わる度に「今はどこまで塞げるか」を確かめ直す事になります。置き場所の効き目は、版に依りません。届くかどうかを決めるのは、自分の設定です(次の節)。 ! 測ったのは各1回で、信頼していないフォルダでの claude -p です。この条件では、プロジェクトの設定の allow は無視され(起動の時に注意が出ます)、deny は効きました。Python の行は、allow を --allowedTools "Bash(python *)" で渡して測りました。対照として、deny を掛けていない README.md は、cat でも Get-Content でも読めました。表の「漏れなかった」は、deny で止まったものです。 目的を2つに分けた 置き場所を変えた後、私は、もう一歩、AI の届かない所へ下書きを出すかを考えました。そして、出さないと決めました。 「公開しない」は、置き場所で守れています。下書きは公開リポジトリに無く、非公開のリポジトリでも追跡していません。 「AI に読ませない」は、捨てました。判断の言葉はこうです。「commit されなければ、読まれても正直困らない」「使い勝手の方が重要」。 実際、今の私の環境では、Claude Code のユーザー設定で、作業の記録のリポジトリを追加の作業ディレクトリに入れています。どのフォルダで Claude Code を起動しても、作業の記録には届きます(上の測定でも、起動された Claude Code の作業ディレクトリに入っていました)。下書きの中身を Claude Code が読む事は、受け入れた上で使っています。 ⇒ 守りたい物を1つの言葉で括ると、全部を設定で守ろうとして、どれも中途半端になります。目的を分けると、どの守りがどの目的に効いているか、どの目的を捨てたかが、自分で見える様になります。 手元の外で動かす場合(クラウドとコンテナ) AI コーディングエージェントは、クラウドでも動く様になっています。Claude Code の cloud session は、指定したリポジトリを clone して動きます。 The cloud VM clones your current directory's GitHub remote at your current branch, not your local checkout, so push first if you have local commits. --cloud works with a single repository at a time. — Use Claude Code in the cloud ⇒ クラウドでも、境界は「どのリポジトリを渡すか」で決まります。別のリポジトリに置いた物は、渡さない限り届きません。 1つ注意が有ります。GitHub の remote が無い時等は、手元のリポジトリを束ねて送ります。macOS・Linux・WSL では、鍵らしい名前のファイルの未 commit の変更は外されます。ネイティブの Windows では、追跡しているファイルの未 commit の変更が、名前に関わらずそのまま送られます(同じ頁の「Send local repositories without GitHub」)。 コンテナでも、同じ考え方が効きました。 Docker のコンテナ(2026 年 8 月・WSL2 の rootless Docker・compose.yml で構成し、VS Code の Dev Containers で開いた): 私は、実演のリハーサルの為に、作業の記録を置かないコンテナを作り、その中で Claude Code を動かしました。その環境を作る中で、VS Code の Dev Containers が手元の git の資格情報をコンテナでも使える様にする事に気付きました。匿名の HTTPS で clone していても、公開リポジトリへ push が通り得ます。これは文書に書かれた仕様です。 If you use HTTPS to clone your repositories and have a credential helper configured in your local OS, no further setup is required. Credentials you've entered locally will be reused in the container and vice versa. — Sharing Git credentials with your container 運用で気を付けるのではなく、コンテナの中の push 先の URL を無効な値に差し替えて塞ぎました(git remote set-url --push origin DISABLED-FOR-DEMO)。 WSL3 のコンテナ(wslc): 2026 年 9 月の WSL 3.0.1(リリースの見出しは「WSLc is generally available.」)で、WSL のコンテナの機能(WSL containers・wslc)が正式になりました(Microsoft の告知 WSL containers is now generally available・公式の文書 WSL container・日本語の報道は窓の杜の記事)。版の番号は 3 ですが、WSL の方式は今も WSL 1 と WSL 2 の2つです(Microsoft Learn の Comparing WSL 1 and WSL 2)。何も付けずに起動したコンテナからは、Windows 側のファイルは見えませんでした(/mnt は空で、マウントの行も無い)。この時に中で動かした AI のツールは Devin CLI で、Claude Code ではありません。 OS の側のサンドボックスを使うなら、公式が挙げているのは macOS・Linux・WSL2 です。Windows なら、WSL2 の中で Claude Code を動かす事になります。Docker Desktop や WSL3 のコンテナの中でサンドボックスが動くかは、私は確かめていません。 置き場所でも止まらない物 置き場所で守れるのは、AI ツールとリポジトリの経路だけです。人間が下書きを手で写して外の生成AI サービスに貼り、その会話を共有すれば、置き場所は何もしません。この経路を構造で止める手段を、私は持っていません。弱い守りを強い守りと思い込む方が危険なので、ここは限界として書いておきます。 持ち帰り: 自分の環境で確かめる事 公開したくない下書きや作業記録が、公開リポジトリの中に有りませんか。.gitignore で除外していても、AI ツールからは読めます。 permissions の deny は、層の1枚として扱っていますか。今の版でも、ファイルを名指さない読み(grep -r)と、自分でファイルを開くスクリプトには効きません。 ネイティブの Windows なら、サンドボックスは無い前提で考えていますか。OS の側で塞ぐなら、WSL2 等の Linux の環境の中で動かす事になります。 守りたい目的を分けていますか(公開しない/AI に読ませない)。捨てた目的が有るなら、それを自分で分かっていますか。 クラウドやコンテナで動かすなら、渡すリポジトリと、中継される資格情報を確かめましたか。 参考: 近い記事 置き場所を守りの土台に据える考え方は、私が最初ではありません。見つけた範囲で、近い記事を挙げます。 Claude Codeに見せない技術: 機密データをリポジトリの外の1箇所に置く事を、最も下の層(L0)に据え、その上に deny・サンドボックス・hooks を重ねています。この記事との違いは、守る物(機密データか、作業記録か)と、置く単位(ディレクトリか、別の git リポジトリか)です。 Claude Code Deny Rules Blocked Read(.env). Bash Read It Anyway: deny を掛けた上で6通りの読み方を試し、本当に機微な物は作業ディレクトリの外に置く、と結んでいます。 Claude Code の sandbox でも、.env は守れなくなくない?: MCP サーバーはサンドボックスの外で動く為、MCP 経由では読めてしまう事を示しています。公式の文書も「The sandbox covers shell commands only. Claude's file tools, MCP servers, and hooks run outside it.」と書いています。
Windows 上想用 Linux 命令,不想再装双系统?🐧 WSL 让你直接运行 Linux 命令行工具和发行版。学 Shell、做开发环境都方便。💻 microsoft/WSL #Windows #浇朋友 #蓝朋友 #互关 #fo
Is it accurate to call this WSL3? WSL 2 was released in 2019, but WSL 2.0.0 was released in 2023 github.com/microsoft/WSL/releases/tag/2.0.0
Great job in benchmarking! I wasn't even aware of the WSLc (WSL3) release. For others, the release info is available here: github.com/microsoft/WSL/releases/tag/3.0.1 EDIT: stumbled on the previous HN post here: news.ycombinator.com
WSL: Windows Subsystem for Linux (34k stars) What it does All text below is quoted directly from the project README. >Windows Subsystem for Linux (WSL) is a powerful way for you to run your Linux command-line tools, utilities and applications, all unmodified and directly on Windows without the overhead of a traditional virtual machine or dual boot setup. >You can install WSL right away by running this command inside of your Windows command line: wsl --install Related repositories: - microsoft/WSL2-Linux-Kernel - The Linux kernel shipped with WSL - microsoft/WSLg - Support for Linux GUI apps in WSL - microsoftdocs/wsl - WSL documentation at aka.ms/wsldocs >This project welcomes contributions of all types, including coding features / bug fixes, documentation fixes, design proposals and more. Repository microsoft/WSL Repository stats |Metric|Value| |:-|:-| |Stars|33,968| |Forks|1,850| |Last release|3.0.1 (2026-09-29)| |Languages|C++ 74.6%, C 21.6%, C# 1.4%| |Contributors|139| |AI contributor accounts (Claude / Codex / Cursor / Copilot)|Claude: 3, Copilot: 260| |AI co-authored commits|Claude: 3, Copilot: 274| Main contributor |Field|Value| |:-|:-| |Name|Blue| |GitHub|@OneBlue| |Commits to this repo|452 (top contributor)| |Bio|Open source enthusiast & WSL maintainer| |Followers|126| |Public repos|23| |On GitHub since|2015-12-29|
🚀Microsoft ha lanzado WSL 3.0.2, incorporando vNUMA automático para máquinas virtuales grandes, lo que mejora el aprovechamiento de servidores con muchos núcleos y memoria. github.com/microsoft/WSL/releases/tag/3.0.2