Surface LLM reasoning in hook output for YELLOW/RED decisions #5
Labels
No labels
enhancement
observability
research
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jbr870/claude-permit#5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
When the LLM scores a tool call as YELLOW or RED, the reasoning is logged to audit.jsonl but not shown to the user. The user sees only a generic permission dialog (YELLOW) or silent denial (RED) with no explanation.
User Stories Served
Proposed Change
The Claude Code hook protocol supports a
messagefield in the JSON response. Currently claude-permit only returnsdecisionand optionallyreason. Add the LLM reasoning to the response:For RED (deny):
For YELLOW (ask user):
The PermissionRequest hook could include the LLM reasoning in its passthrough, so Claude Code's permission dialog shows context.
Considerations