Skip to content

Instantly share code, notes, and snippets.

View JoeApo108's full-sized avatar

Jozef Huscava JoeApo108

View GitHub Profile
@JoeApo108
JoeApo108 / auto-approve-piped-commands.sh
Created January 14, 2026 09:49
Claude Code hook to auto-approve piped/chained bash commands when all components match allowed patterns (fixes github.com/anthropics/claude-code/issues/13340)
#!/usr/bin/env bash
# Auto-approve piped/chained bash commands when all components match allowed patterns
# This fixes the Claude Code bug where piped commands prompt even when individual commands are allowed
set -euo pipefail
# Read input from stdin (Claude passes CLAUDE_TOOL_INPUT as JSON)
INPUT=$(cat)
# Extract the command from the JSON input