3d57db9644
`stat -f '%Lp'` is BSD/macOS syntax. On Linux, `stat -f` prints filesystem info (Block size / Inodes / ...) and still exits 0, so the `||` fallback to `stat -c '%a'` never fires. That left `$perms` as multi-line garbage, the `!= "600"` check was always true, and every Linux SessionStart hook invocation printed a bogus warning plus the whole `stat -f` filesystem dump. Reorder to try GNU stat first, fall back to BSD for macOS. Verified on Linux (cpython-3.12 / bash 5.x) — hook now emits the expected compact Ready banner with no false warning. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>