rtk-ai / rtk-ai/rtk

Live hook (rtk hook claude) hangs/mangles path on unrecognized commands (e.g. graphify)

Open
#4,080 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.