Hooks

Gate an agent’s built-in shell and file tools with icy ask.

How icy ask works

icy ask sends a blocking approval request through the running daemon and waits for your decision. It exits 0 on approve and 2 on deny, timeout, frozen agent, or unreachable daemon (fail closed).

Claude Code PreToolUse hook

~/.claude/settings.json
{
  "hooks": {
    "PreToolUse": [{
      "matcher": "Bash|Write|Edit",
      "hooks": [{
        "type": "command",
        "command": "icy ask --agent claude-code --summary -",
        "timeout": 180
      }]
    }]
  }
}

Passing --summary - reads Claude Code’s hook JSON from stdin and condenses it into a single readable line (for example, Bash: git push origin main) with secrets redacted. Keep the hook timeout higher than [approvals] timeout_seconds.