The hook was outputting "approve" for permissionDecision, but Claude Code expects "allow" to auto-approve tool calls. Since "approve" is not a valid value in the PreToolUse hook protocol, Claude fell back to showing the default shell-quote warning instead of honoring the hook's auto-approval. Added comprehensive edge case tests for nix build/run command handling. [0]: https://docs.anthropic.com/en/docs/claude-code/hooks