Skip to content

fix(hookify): restore stop and prompt simple pattern rules#42807

Open
waelmas wants to merge 1 commit intoanthropics:mainfrom
waelmas:fix-hookify-stop-prompt-rules
Open

fix(hookify): restore stop and prompt simple pattern rules#42807
waelmas wants to merge 1 commit intoanthropics:mainfrom
waelmas:fix-hookify-stop-prompt-rules

Conversation

@waelmas
Copy link
Copy Markdown

@waelmas waelmas commented Apr 2, 2026

Summary

Fixes #32153.

Hookify simple pattern: rules for event: stop and event: prompt were being mapped to content, which never resolves for those hook payloads. This change maps them to the existing supported fields:

  • stop -> reason
  • prompt -> user_prompt

It also adds regression tests covering all simple event mappings plus advanced conditions: behavior.

Prior art: #32751

Testing

  • python3 -m unittest plugins.hookify.tests.test_hookify_rule_mapping
  • verified direct rule-engine checks for stop, prompt, bash, and file payloads

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.

Bug: hookify stop/prompt rules never match due to wrong field mapping in config_loader.py

2 participants