Urgent.News

What's breaking now, across thousands of outlets.

AI

Approve Claude Code permission prompts from anywhere with the PermissionRequest hook

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…

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.

A 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.

The 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.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

LazyDesk AI: Let AI Handle the Little Tasks You Keep Postponing

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady We all have those small tasks that we keep postponing: organizing files, reading lengthy documents…

  • LazyDesk AI automates repetitive digital tasks
  • Processes text locally on users' machines
  • Provides control over tools and data

Penmentor - Claude marks up your handwritten math like a teacher

A maths mentor at the tip of your pen. Press a key while you work by hand: Claude, Gemini or GPT marks your work on the screen like a teacher with coloured pens, gives you hints instead of answers…

  • Claude AI marks up handwritten math like a teacher.
  • Provides hints, interactive animations, and feedback on mistakes.
  • Integrates with xournal++ for paper-based learning and practice.

Building a Real-Time E-Commerce Support Platform with an AI Agent Team

Ever abandoned a shopping cart because you couldn't quickly ask, "When will my package arrive?" Industry averages put cart abandonment at around 70% , and slow answers are a major cause: contact…

  • Aura Gear platform reduces cart abandonment by enabling real-time customer support.
  • Modular documentation serves as AI agents' working memory for optimal performance.

More from Sunday 25 October →