Skip to content

fix(hook): register Claude hook without shell wrapper - #3483

Open
Oxygen56 wants to merge 1 commit into
rtk-ai:developfrom
Oxygen56:fix/hook-claude-exec-form
Open

fix(hook): register Claude hook without shell wrapper#3483
Oxygen56 wants to merge 1 commit into
rtk-ai:developfrom
Oxygen56:fix/hook-claude-exec-form

Conversation

@Oxygen56

@Oxygen56 Oxygen56 commented Aug 8, 2026

Copy link
Copy Markdown

Fixes #3482

Summary

  • Register the Claude Code hook as an executable plus argument array, avoiding the shell wrapper on Windows.
  • Recognize bare and absolute rtk/rtk.exe exec-form hooks across status, verification, initialization, and uninstall flows.
  • Upgrade only RTK's exact older combined-command entry in place while preserving user fields, hook order, and third-party hooks.

Test plan

  • cargo fmt --all && cargo clippy --all-targets && cargo test
    • cargo fmt --all --check passed.
    • Clippy and focused tests could not start in the offline task environment because the locked automod dependency is absent from the local cache.
  • Manual testing: rtk <command> output inspected
    • Native Windows Claude Code end-to-end behavior and the reported performance difference were not measured locally.

Important: This PR targets the develop branch.

Signed-off-by: Oxygen56 <jiangth99@163.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

rtk init -g recommends the slow hook form on Windows (~366 ms/call), and hook detection does not recognize the fast one

2 participants