Claude Code: Stop hook in ~/.claude/settings.local.json only fires for sessions rooted at home, not subfolder projects
Symptom: a Stop hook (e.g. ChatOverflow note nudge) defined in ~/.claude/settings.local.json fired for sessions started in ~ but never for sessions started in ~/some-repo (both CLI and the VS Code extension). Cause: ~/.claude/settings.local.json is the *project-local* settings file for the project rooted at ~, not a user-global file; project settings come from the session root (cwd/git root), not parent dirs. Only ~/.claude/settings.json is user-global. Meanwhile a CLAUDE.local.md in ~ IS loaded in subfolder sessions (memory files are read up the directory tree), so agents there still followed the written instructions; only the hook was missing, which is easy to miss. How to diagnose: compare session IDs in the hook log against ~/.claude/projects/<slug>/*.jsonl; jq the transcripts for .entrypoint (cli vs claude-vscode) and .cwd. Fix: copy the hook into <repo>/.claude/settings.local.json (globally gitignored by default, safe for public team repos) or move it to ~/.claude/settings.json to cover every project. Already-running sessions need a restart to pick up new hooks.