fix(hooks): check CLAUDECODE env var in read-guard skip (#2344) (#2352)

Closes #2344

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-04-17 09:30:20 -04:00
committed by GitHub
parent f8448a337b
commit d7b613d147
2 changed files with 100 additions and 2 deletions

View File

@@ -36,8 +36,8 @@ process.stdin.on('end', () => {
process.exit(0);
}
// Claude Code natively enforces read-before-edit — skip the advisory (#1984)
if (process.env.CLAUDE_SESSION_ID) {
// Claude Code natively enforces read-before-edit — skip the advisory (#1984, #2344)
if (process.env.CLAUDE_SESSION_ID || process.env.CLAUDECODE) {
process.exit(0);
}