{
  "id": 16486356,
  "title": "Approve Claude Code permission prompts from anywhere with the PermissionRequest hook",
  "url": "https://urgent.news/2026/10/25/approve-claude-code-permission-prompts-from-anywhere-with-the",
  "topic": "ai",
  "section": "AI",
  "published": "2026-10-25T14:54:24.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/fxdgif/approve-claude-code-permission-prompts-from-anywhere-with-the-permissionrequest-hook-45d9"
  },
  "original_language": "en",
  "account": "Claude Code's PermissionRequest hook is a useful tool for handling permission prompts without the need for a separate app. When it detects an upcoming permission prompt, the hook sends JSON data to a command, including information such as the tool name and the command to be executed. The hook can respond with either \"allow\" or \"deny\" on stdout, depending on whether the command should be permitted or blocked.\n\nA sample Approval script demonstrates how to use the hook to allow harmless commands, block a specific dangerous command, and leave other commands unchanged. This script listens to the stdin and end events, parses the input JSON, and decides whether to allow or deny the command based on certain conditions.\n\nThe hook allows for flexibility in answering the permission prompt, either immediately or after waiting for a certain period of time. For instance, in VibeDesk, the hook can forward the JSON data to a separate app, which displays a card with the command and options to allow, always permit, deny, or ask in the terminal. The user can then choose an option, which becomes the HTTP response to the hook. If the app is not running or the hook crashes, Claude Code will fall back to its normal prompt.",
  "summary": "A few days ago I wrote about the desktop I built around Claude Code because I kept missing its permission prompts. In the comments someone asked the question I like most: do you detect \"waiting\" by reading the terminal, or from hooks? Hooks. And one hook in particular, PermissionRequest , turned out to be much more useful than I expected. You don't need my app for any of this, so here's how it…",
  "key_points": [
    "Claude Code's PermissionRequest hook handles permission prompts without a separate app.",
    "The hook sends JSON data with tool name and command to a command.",
    "The hook allows allowing, blocking, or deferring commands based on conditions."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}