Skip to content

fix(hook): keep ask decision on claude rewrites#2571

Open
YOMXXX wants to merge 1 commit into
rtk-ai:developfrom
YOMXXX:fix/issue-2549-hook-permission-decision
Open

fix(hook): keep ask decision on claude rewrites#2571
YOMXXX wants to merge 1 commit into
rtk-ai:developfrom
YOMXXX:fix/issue-2549-hook-permission-decision

Conversation

@YOMXXX

@YOMXXX YOMXXX commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • emit an explicit permissionDecision: "ask" for Claude native hook rewrites that are not explicitly allowed
  • keep permissionDecision: "allow" limited to AllowRewrite, so mixed compounds with unallowed segments are not auto-approved
  • add regression coverage for mixed compound rewrites and the default ask-not-allow path

Fixes #2549

Verification

  • cargo +1.93.0 test claude_mixed_compound -- --nocapture
  • cargo +1.93.0 test claude_default_rewrite_is_ask_not_allow -- --nocapture
  • cargo +1.93.0 test claude_ -- --nocapture
  • cargo +1.93.0 run --quiet -- hook claude with the reported mixed-compound stdin payload
  • cargo +1.93.0 test hook_cmd -- --nocapture
  • cargo +1.93.0 fmt --all -- --check
  • cargo +1.93.0 clippy --all-targets
  • cargo +1.93.0 test --all -- --skip small_grep_not_worse_than_plain
  • git diff --check

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.

Hook (rtk hook claude) drops permissionDecision for mixed compound commands

1 participant