fix(tool-routing): output JSON format for PreToolUse hook blocking#26
Merged
technicalpickles merged 3 commits intomainfrom Feb 2, 2026
Merged
fix(tool-routing): output JSON format for PreToolUse hook blocking#26technicalpickles merged 3 commits intomainfrom
technicalpickles merged 3 commits intomainfrom
Conversation
Changed hook output from plain text stderr + exit 2 to structured JSON stdout + exit 0, which is the format Claude Code expects for PreToolUse hooks to control tool behavior. Also fixed hooks.json command: - Use --quiet to suppress uv's venv creation messages - Use --directory instead of --project for correct working directory Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds bin/test-claude wrapper that creates an isolated Claude config for testing plugin hooks without affecting the user's real config. Features: - Sets up local-test marketplace pointing to repo - Copies bedrock settings from global config - Installs plugins to isolated cache - Supports --setup, --install, --status, --clean, --reset Generated test artifacts go in tmp/ (now gitignored). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.
Summary
--quiet(suppress uv output) and--directory(correct flag)Changes
cli.py: Output JSON with
hookSpecificOutput.permissionDecision: denyinstead of plain text to stderrhooks.json: Use
uv run --quiet --directory "${CLAUDE_PLUGIN_ROOT}"instead of--projectTest plan
Hook denied tool use for WebFetchandWebFetch tool permission denied🤖 Generated with Claude Code