Skip to content

fix(hooks): stop recording Claude Code decisions and denials nobody made (from zedoraps' #513) - #515

Merged
blitzcrieg1 merged 1 commit into
masterfrom
fix/claude-hook-approval-requests-main
Nov 27, 2026
Merged

blitzcrieg1 merged 1 commit into
masterfrom
fix/claude-hook-approval-requests-main

Conversation

@blitzcrieg1

Copy link
Copy Markdown
Owner

Same commits as #513 (author preserved in the commits); reopened from a same-repo branch because fork PRs from first-time contributors need workflow approval. Rebases #513 onto current master and fixes the README collected count (3100). Original description follows.\n\n---\n\nThree fixes in the Claude Code hook adapter: no more decision:ask on every PreToolUse, notifications no longer become inferred denials, and the Agent tool name counts as a subagent start so subagent-swarm-burst can match.

Claude Code sends no decision to PreToolUse: permissionDecision is a
field of the hook's output, so the adapter's default recorded every
call as `decision:ask`. The reason is now `hook:PreToolUse`, plus
`permission_mode:<mode>` when the harness reports one. A mode that is
not a plain identifier becomes `unknown`, so it cannot add fields to
the reason. A caller that sends permissionDecision keeps the old form.

Every Notification became an approval request without a tool, which no
call could answer, so the session end recorded it as an inferred
denial. Only a Notification of type `permission_prompt` is recorded
now, and ingest does not infer an answer for it. Notifications that
ask nothing, such as `idle_prompt` or `auth_success`, are not recorded.

Claude Code renamed its subagent tool from Task to Agent, so
`subagent_start` never fired on current versions. Both names count.
@blitzcrieg1
blitzcrieg1 merged commit a28b615 into master Nov 27, 2026
10 checks passed
@blitzcrieg1
blitzcrieg1 deleted the fix/claude-hook-approval-requests-main branch November 27, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants