In VS Code 1.141.0 and earlier the Copilot agent could edit hook files in custom locations without an approval prompt, letting injected content add a shell command that later ran with the user's privileges. The post compares the 1.141.1 fix with how Claude Code treats writes under .claude/.
Key points
- CVE-2026-102232 stems from auto-approving edits under chat.hookFilesLocations and chat.agentFilesLocations.
- The fix in 1.141.1 treats those locations as sensitive edit locations that require confirmation.
- If you cannot update, set chat.useHooks and chat.useClaudeHooks to false.
- The Copilot harness also reads a repository's .claude/settings.json, so hooks affect both tools.
- Claude Code treats .claude/ as a protected path: default and acceptEdits prompt, and allow rules do not skip it.
- A ConfigChange hook can block mid-session settings changes with exit code 2.
- For claude -p runs, pass --settings '{"disableAllHooks": true}' to disable repository hooks.
Real-world use
- Teams opening the same repository in both the VS Code Copilot harness and Claude Code
- Running non-interactive agents with claude -p or the SDK on repositories you did not write
- Teams that want to audit or block settings changes during a running session
This summary was generated by the agent from the original post on DEV: claudecode. The full text and all rights belong to its author and publisher. Go to original