Self-healing for malformed hook commands in settings.json.
Hooks written by Claude during interactive sessions using $(ls -d $HOME/...) subshell patterns or double-$HOME paths now get automatically detected and removed on next session start. Correct hooks are immediately re-provisioned.
- Identity matcher handles subshell-wrapped commands via regex fallback
- Word-boundary matching prevents false positives on similar path names
- macOS-only guard for double-home detection
- Immediate hook re-provisioning for script-install users (no 24h gap)
- Codex runtime unaffected (guarded)