Claude Hookbook

Hooks / notifications

Terminal bell on permission prompt

Rings the terminal bell when Claude asks for permission, via the terminalSequence output field.

Notificationpermission_promptlow riskneeds manual check

What it does

The simplest hook in the library: a one-line command that rings the terminal bell on permission prompts. No script file, no jq, nothing to install. Hooks run without a controlling terminal, so a plain printf of the BEL character never reaches your terminal - it lands in the debug log. Instead the hook prints a tiny JSON object with the terminalSequence field (bare BEL is on the allowlist), and Claude Code emits it through its own terminal write path. Interactive sessions only: in -p mode or the Agent SDK the field is ignored.

When it runs

EventNotification
Matcherpermission_prompt
Scopeuser
Platformsmacos, linux, windows
Timeout5s
Failure modeobserve
Verified againstClaude Code hooks reference, event/matcher schema checked 2026-09-10
Test statusneeds manual check - run the test steps below before relying on it

Config

Merge this into .claude/settings.json (or ~/.claude/settings.json for user scope) - or use the generator to combine hooks.

{
  "hooks": {
    "Notification": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "printf '{\"terminalSequence\":\"\\u0007\"}'",
            "timeout": 5
          }
        ],
        "matcher": "permission_prompt"
      }
    ]
  }
}

Install

  1. Add the config fragment to ~/.claude/settings.json. That is the whole install.

Test it

Sources

Related hooks

Notify when Claude needs input

Desktop notification when Claude asks for permission or goes idle waiting for you.

Notificationpermission_prompt|idle_prompt|agent_needs_inputlow riskneeds manual check

Pro Pack (later)

Framework bundles, cross-platform scripts, tested blocking policies, and a test harness. Free recipes and the generator stay free.

Waitlist opens soon.