rtk-ai/rtk

Native Windows section of README/docs still describes pre-v0.37.0 CLAUDE.md fallback

Open

#2115 aperta il 27 mag 2026

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)Rust (2914 fork)batch import
area:docsdocumentationgood first issueplatform:windowspriority:medium

Metriche repository

Star
 (48.085 star)
Metriche merge PR
 (Merge medio 11g 1h) (45 PR mergiate in 30 g)

Descrizione

The Native Windows section of README.md and matching docs still describe the pre-v0.37.0 fallback behavior, where rtk init -g on native Windows could not install a working hook and fell back to CLAUDE.md injection. Since v0.37.0 (CHANGELOG: hooks: windows use 'rtk hook claude' no fallback), rtk init -g installs the native rtk hook claude PreToolUse hook on all platforms including Windows, and the rtk-rewrite.sh shell script is no longer required for Claude Code.

Stale claims I noticed while reading the docs from a Windows install:

https://github.com/rtk-ai/rtk/blob/39583cf22b0a73ef78f935d8ada1c87a9a10e852/README.md#L90

https://github.com/rtk-ai/rtk/blob/39583cf22b0a73ef78f935d8ada1c87a9a10e852/README.md#L317

https://github.com/rtk-ai/rtk/blob/39583cf22b0a73ef78f935d8ada1c87a9a10e852/README.md#L330-L350

https://github.com/rtk-ai/rtk/blob/39583cf22b0a73ef78f935d8ada1c87a9a10e852/docs/guide/resources/troubleshooting.md#L119

https://github.com/rtk-ai/rtk/blob/39583cf22b0a73ef78f935d8ada1c87a9a10e852/docs/guide/getting-started/supported-agents.md#L182

Each one tells Windows users the auto-rewrite hook does not work and that rtk init -g falls back to CLAUDE.md injection.

Looking at the current code, rtk init -g for Claude Code writes a Bash matcher with "command": "rtk hook claude" into ~/.claude/settings.json unconditionally, on Windows the same as macOS/Linux — no cfg!(target_os = \"windows\") branch and no shell-script dependency:

https://github.com/rtk-ai/rtk/blob/39583cf22b0a73ef78f935d8ada1c87a9a10e852/src/hooks/constants.rs#L12

https://github.com/rtk-ai/rtk/blob/39583cf22b0a73ef78f935d8ada1c87a9a10e852/src/hooks/init.rs#L1054-L1086

I can confirm from a native Windows install (v0.42.0, Claude Code) that the hook is in settings.json as rtk hook claude and rewrites Bash tool calls transparently — no CLAUDE.md injection involved.

One related caveat that might be worth mentioning in the same place: the hook matcher is hardcoded to Bash, so when Claude Code is configured to use the PowerShell tool (CLAUDE_CODE_USE_POWERSHELL_TOOL=1), commands are not rewritten. That gap is already tracked in #1319, but readers landing on the Windows section today may not realize the Bash-tool-only scope is the only real limitation now.

Related closed issues: #1290, #1353.

Guida contributor