PermissionRequest hooks should support additionalContext

Resolved 💬 2 comments Opened Feb 24, 2026 by sidsarasvati Closed Mar 24, 2026

Feature Request

additionalContext works on PreToolUse, UserPromptSubmit, and other hook events — but not on PermissionRequest. It would be valuable to support it there too.

Use Case

When building an AI permission gatekeeper (a hook that auto-approves/denies permission requests), the hook sometimes wants to pass context back to the model along with the approval. For example:

  • "Approved, but this is a production database — be careful with mutations"
  • "Approved, but this directory has uncommitted changes"
  • "Approved rm on single file, but note: 3 other files match this pattern"

This mirrors what humans can do when they click "Yes" on the permission dialog and type additional instructions.

Current Behavior

The additionalContext field is accepted and parsed by the hook response handler (confirmed via debug logs), but the value is silently dropped — it never reaches the model's conversation context.

Debug log showing it's parsed correctly:

Hooks: Parsed initial response: {"hookSpecificOutput":{"hookEventName":"PermissionRequest","decision":{"behavior":"allow"}},"additionalContext":"Test context from hook"}
Hook PermissionRequest:Bash (PermissionRequest) success: {"hookSpecificOutput":...,"additionalContext":"Test context from hook"}

Expected Behavior

additionalContext in a PermissionRequest hook response should be injected into the model's context, the same way it works for PreToolUse hooks.

Workaround

Using PreToolUse instead of PermissionRequest works, but fires on every tool call (latency tax) rather than only when a permission dialog would show.

Environment

  • Claude Code 2.1.x
  • macOS

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗