Repository navigation
fix(hooks): stop recording Claude Code decisions and denials nobody made (from zedoraps' #513) - #515
Merged
Conversation
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.
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.