Skip to content

fix(hook): accept current Claude tool input keys#2535

Open
YOMXXX wants to merge 1 commit into
rtk-ai:developfrom
YOMXXX:fix/claude-hook-tool-input-keys
Open

fix(hook): accept current Claude tool input keys#2535
YOMXXX wants to merge 1 commit into
rtk-ai:developfrom
YOMXXX:fix/claude-hook-tool-input-keys

Conversation

@YOMXXX

@YOMXXX YOMXXX commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • accept both Claude hook payload formats: tool_input and current input
  • preserve the original input object fields when emitting updatedInput
  • add a regression test for the current tool/input payload shape

Fixes #2493

Tests

  • cargo +1.93.0 fmt --all -- --check
  • cargo +1.93.0 test hooks::hook_cmd::tests -- --nocapture
  • cargo +1.93.0 test --all
  • cargo +1.93.0 clippy --all-targets -- -D warnings

Manual verification

  • printf '%s\n' '{"tool":"Bash","input":{"command":"grep -r hello .","timeout":30000}}' | target/debug/rtk hook claude emitted updatedInput.command = "rtk grep -r hello ."
  • legacy tool_name/tool_input payload still emits the same rewrite

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 claude: JSON key mismatch — tool/input vs tool_name/tool_input

1 participant