Live hook (rtk hook claude) hangs/mangles path on unrecognized commands (e.g. graphify)
Open
Nobody has claimed this yet.
area:cli
bug
platform:windows
priority:high
- Dominant language
- Rust
- Stars
- 81.1k
- Forks
- 5.1k
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 40
Description
- Version: rtk 0.48.0 (winget, rtk-ai.rtk)
- OS: Windows 11, git-bash shell
- Repro: echo '{"tool_name":"Bash","tool_input":{"command":"graphify query test"}}' | rtk hook claude
→ hangs 120s, no output. - Compare: rtk hook check "graphify query test" → instant, correct No rewrite for: graphify query test.
- Symptom in Claude Code: PreToolUse:Bash hook error — /usr/bin/bash: line 1: C:UsersMarco.localbingraphify.EXE: command not found.
Windows backslash path getting stripped by bash (backslash-as-escape), suggests hook's fallback path-resolution for unknown binaries builds a raw Windows path then feeds it through bash unconverted.
- Workaround found: adding target command to exclude_commands in ~/AppData/Roaming/rtk/config.toml avoids it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the JSON pipeline with rtk hook claude on Windows 11 under git-bash, then trace the Claude hook's fallback path resolution for the unrecognized graphify command. Compare it with rtk hook check; done means the hook returns promptly, emits no malformed command, and preserves the executable path without requiring an exclusion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, shell
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100