Skip to content

chore: wire the Bash tool into the benchmark's PreToolUse matcher - #66

Merged
algomaster99 merged 1 commit into
mainfrom
feat/benchmark-bash-hook-matcher
Sep 25, 2026
Merged

algomaster99 merged 1 commit into
mainfrom
feat/benchmark-bash-hook-matcher

Conversation

@algomaster99

@algomaster99 algomaster99 commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Summary

benchmark/run_case.sh generates a hook-condition settings.json with the PreToolUse matcher hardcoded to "Write|Edit", so the Bash-write-detection heuristic (added for the manifest-bypass-via-bash case) was never actually exercised by any benchmark run — Claude Code doesn't route Bash tool calls to the hook at all when the matcher excludes them, regardless of what those commands touch. Any past benchmark result showing zero Bash interceptions reflects this wiring gap rather than the feature working, or no bypass attempts happening.

Change

  • run_case.sh: matcher for the hook condition is now "Write|Edit|Bash".

🤖 Generated with Claude Code

@algomaster99 algomaster99 changed the title feat: wire the Bash tool into the benchmark's PreToolUse matcher chore: wire the Bash tool into the benchmark's PreToolUse matcher Sep 25, 2026
@algomaster99
algomaster99 changed the base branch from fix/bash-manifest-write-detection to main September 25, 2026 11:20
run_case.sh generated a `hook`-condition settings.json with the matcher
hardcoded to "Write|Edit", so the Bash-write-detection heuristic added
in a prior commit was never exercised by any benchmark run - Claude
Code never routed Bash tool calls to the hook at all, regardless of
whether they touched a manifest. Every recorded run's "0 Bash
interceptions" reflected a wiring gap, not evidence the feature works
or that no bypass attempts occurred.

Depends on the fix in #65 for the underlying Bash heuristic's false
positives; landing this before that fix would flood benchmark
transcripts with spurious blocks on read-only commands.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@algomaster99
algomaster99 force-pushed the feat/benchmark-bash-hook-matcher branch from 0936c4a to 294f558 Compare September 25, 2026 11:21
@algomaster99
algomaster99 merged commit 7677386 into main Sep 25, 2026
2 checks passed
@algomaster99
algomaster99 deleted the feat/benchmark-bash-hook-matcher branch September 25, 2026 11:23
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.

1 participant