Skip to content

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

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

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

@rtk-release-bot

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale due to 90 days of inactivity. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. Your contribution is very much appreciated — we're sorry we haven't been able to review it yet.

@KuSh

KuSh commented Oct 3, 2026

Copy link
Copy Markdown
Collaborator

Thank you for working on this. Closing as no longer applicable: the situation this change describes does not hold anymore, so the hook no longer needs an explicit ask decision for rewrites. If you still see a mixed compound command approved without confirmation on a recent build, please comment with the Claude Code version and this can be reopened.

@KuSh KuSh closed this Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants