You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've installed everything for windows and GitHub Copilot and it does not seem to be using RTK at all. How can I get it to use RTK more to save tokens?
I see this in the README.md, but unsure what it actually means: "On native Windows (cmd.exe / PowerShell), RTK filters work but the hook does not auto-rewrite commands"
User asking how to configure RTK with GitHub Copilot on Windows; likely a usage/setup question referencing a known Windows hook limitation documented in the README
📁 Relevant files
README.md
Triaged automatically by wshm · This is an automated analysis, not a human review.
The README line you quoted has a concrete cause, at least for Copilot CLI on Windows: rtk hook copilot only recognizes the native Copilot payload when toolName == "bash", but Copilot CLI names its shell tool powershell on Windows. The payload therefore falls through to PassThrough and the native path never runs.
Captured from a live session (Copilot CLI 1.0.73, Windows 11, RTK 0.43.0):
toolArgs is already the JSON-encoded string RTK expects — only toolName differs.
Details in #3178, one-line fix + regression test in #3179.
Note that on Windows the rewrite does still happen today, through the Claude-compat PreToolUse entry that rtk init also writes — but that path emits permissionDecision: "ask", so you get an approval prompt on every single command (#3037). So depending on which entry answers, you either get no rewrite or a prompt every time.
Retracting the last paragraph of my comment above: I claimed the unrecognized toolName: "powershell" explains the README's "on native Windows the hook does not auto-rewrite commands". That is wrong for Copilot CLI — I've since tested it instead of inferring it.
Copilot CLI fires both hook entries that rtk init --copilot registers. The camelCase one is indeed ignored on Windows (that part stands, #3178/#3179), but the PascalCase PreToolUse one receives the same call remapped to tool_name: "Bash" and its updatedInputis applied — verified with a throwaway hook that rewrote echo PROBE_INPUT_5521 into echo REWRITE_APPLIED_9137, and the session printed REWRITE_APPLIED_9137.
So on Windows the rewrite does happen; what you'd notice instead is a permission prompt on every command (#3037, fixed properly by #3212). Whatever is causing "not using RTK at all" in your setup is something else — worth checking that ~/.copilot/hooks/rtk-rewrite.json exists and that the commands you're running are ones rtk actually rewrites (rtk hook check "<your command>" shows this).
Retracting the last paragraph of my comment above: I claimed the unrecognized toolName: "powershell" explains the README's "on native Windows the hook does not auto-rewrite commands". That is wrong for Copilot CLI — I've since tested it instead of inferring it.
Copilot CLI fires both hook entries that rtk init --copilot registers. The camelCase one is indeed ignored on Windows (that part stands, #3178/#3179), but the PascalCase PreToolUse one receives the same call remapped to tool_name: "Bash" and its updatedInputis applied — verified with a throwaway hook that rewrote echo PROBE_INPUT_5521 into echo REWRITE_APPLIED_9137, and the session printed REWRITE_APPLIED_9137.
So on Windows the rewrite does happen; what you'd notice instead is a permission prompt on every command (#3037, fixed properly by #3212). Whatever is causing "not using RTK at all" in your setup is something else — worth checking that ~/.copilot/hooks/rtk-rewrite.json exists and that the commands you're running are ones rtk actually rewrites (rtk hook check "<your command>" shows this).
This looks resolved on the current code (PR #3179 (v0.44.1), PR #3212), but it could not be fully reproduced here. Marking it resolved-pending-close: it will be closed in a while unless someone reports it still happening on the latest version.
This has carried the resolved-pending-close label with no new report of it happening, so closing it. Two concrete causes were found here and both are fixed: #3179 (v0.44.1) made the hook recognise Copilot CLI's shell tool when it is named powershell on Windows, and #3212 removed the permission prompt that fired on every rewritten command. Feeding the Windows Copilot payload to the current build returns the rewritten rtk git status with no prompt. If commands still are not going through rtk on the latest version, comment here with the output of rtk hook check "<your command>" and we will reopen.
Activity
pszymkowiak commentedon Jun 12, 2026
🔍 Automated Triage
questionlowSummary
User asking how to configure RTK with GitHub Copilot on Windows; likely a usage/setup question referencing a known Windows hook limitation documented in the README
📁 Relevant files
README.mdTriaged automatically by wshm · This is an automated analysis, not a human review.
romain-cureau commentedon Jul 23, 2026
The README line you quoted has a concrete cause, at least for Copilot CLI on Windows:
rtk hook copilotonly recognizes the native Copilot payload whentoolName == "bash", but Copilot CLI names its shell toolpowershellon Windows. The payload therefore falls through toPassThroughand the native path never runs.Captured from a live session (Copilot CLI 1.0.73, Windows 11, RTK 0.43.0):
{"sessionId":"...","cwd":"C:\Windows\System32","toolName":"powershell","toolArgs":"{\"command\":\"rtk gain\",...}"}toolArgsis already the JSON-encoded string RTK expects — onlytoolNamediffers.Details in #3178, one-line fix + regression test in #3179.
Note that on Windows the rewrite does still happen today, through the Claude-compat
PreToolUseentry thatrtk initalso writes — but that path emitspermissionDecision: "ask", so you get an approval prompt on every single command (#3037). So depending on which entry answers, you either get no rewrite or a prompt every time.romain-cureau commentedon Jul 27, 2026
Retracting the last paragraph of my comment above: I claimed the unrecognized
toolName: "powershell"explains the README's "on native Windows the hook does not auto-rewrite commands". That is wrong for Copilot CLI — I've since tested it instead of inferring it.Copilot CLI fires both hook entries that
rtk init --copilotregisters. The camelCase one is indeed ignored on Windows (that part stands, #3178/#3179), but the PascalCasePreToolUseone receives the same call remapped totool_name: "Bash"and itsupdatedInputis applied — verified with a throwaway hook that rewroteecho PROBE_INPUT_5521intoecho REWRITE_APPLIED_9137, and the session printedREWRITE_APPLIED_9137.So on Windows the rewrite does happen; what you'd notice instead is a permission prompt on every command (#3037, fixed properly by #3212). Whatever is causing "not using RTK at all" in your setup is something else — worth checking that
~/.copilot/hooks/rtk-rewrite.jsonexists and that the commands you're running are ones rtk actually rewrites (rtk hook check "<your command>"shows this).Sorry for the misdirection.
BillChirico commentedon Jul 27, 2026
So is it working properly or not for Windows?
KuSh commentedon Sep 5, 2026
This looks resolved on the current code (PR #3179 (v0.44.1), PR #3212), but it could not be fully reproduced here. Marking it resolved-pending-close: it will be closed in a while unless someone reports it still happening on the latest version.
KuSh commentedon Sep 13, 2026
This has carried the resolved-pending-close label with no new report of it happening, so closing it. Two concrete causes were found here and both are fixed: #3179 (v0.44.1) made the hook recognise Copilot CLI's shell tool when it is named
powershellon Windows, and #3212 removed the permission prompt that fired on every rewritten command. Feeding the Windows Copilot payload to the current build returns the rewrittenrtk git statuswith no prompt. If commands still are not going through rtk on the latest version, comment here with the output ofrtk hook check "<your command>"and we will reopen.