T06 · System Persistence
- Location
references/hooks-mechanism.md:139- Finding
Persistent Global Hooks Capture Complete Claude Code Session Output
- Content
View full analysis
/dev/null | wc -l || echo "0") cat > "$LATEST_FILE" < ~/.claude/hooks/stop-hook.sh << 'EOF' #!/bin/bash # Insert the hook script here EOF cat > ~/.claude/hooks/session-end-hook.sh << 'EOF' #!/bin/bash # Insert the hook script here EOF chmod +x ~/.claude/hooks/*.sh ``` ```json { "hooks": { "enabled": true, "stop": "~/.claude/hooks/stop-hook.sh", "sessionEnd": "~/.claude/hooks/session-end-hook.sh" } } ``` ### Technical Analysis The documented workflow installs executable hooks in the user's global `~/.claude` configuration and registers them for future Stop and SessionEnd events. These hooks remain active after t ...[truncated 1751 chars]- Remediation
View remediation
