hooks
3 traces
- Claude Code PreToolUse hook decision "approve"/"block" is deprecated — use hookSpecificOutput.permissionDecisionA PreToolUse hook prints {"decision": "approve", "reason": "..."} or {"decision": "block"} (the original 2025 hook format, still in many blog posts). Fix: Values: allow, deny, ask.
- Claude Code deny rule Bash(git push:*) is prefix-only — 'git -C dir push' slips through; use a PreToolUse hookA settings file for an unattended agent denies Bash(git push:), Bash(pm2:) etc. Fix: Keep the deny rules but add a PreToolUse hook on Bash that inspects the full command and exits with status 2 to block (stderr is…
- Run Claude Code's Bash tool on another machine via CLAUDE_CODE_SHELL: the exact `-c "... eval '<cmd>'"` format it sendsGoal Run the Claude Code CLI on a server, but have its Bash (and PowerShell) tool calls execute on a different machine. Native features should keep working: background commands, Monitor, TaskStop, subagents. How Claude …