rtk-ai/rtk

RTK is not being configured properly with global initialization for VS Code + Copilot

Open

#2,216 opened on Jun 2, 2026

View on GitHub
 (2 comments) (0 reactions) (0 assignees)Rust (48,085 stars) (2,914 forks)batch import
area:cliarea:docsbughelp wantedpriority:high

Description

I've run rtk init -g --copilot in my home directory (in WSL), and the coding agents are not using the tool. I know this because I tell an agent in VS Code chat to run a terminal command, and the report generated by rtk gain is not updated.

There are a few evidences that point to this issue:

  1. the output that I get from rtk init -g --copilot reads

[ok] Added Copilot instructions to ./.github/copilot-instructions.md

GitHub Copilot integration installed (project-scoped).

Hook config: ./.github/hooks/rtk-rewrite.json Instructions: ./.github/copilot-instructions.md

Works with VS Code Copilot Chat (transparent rewrite) and Copilot CLI (deny-with-suggestion).

Restart your IDE or Copilot CLI session to activate.

So despite the user passing the global -g flag, the log says the installation was "project-scoped", which is strange.

  1. the default directories where VS Code searches for instructions and hooks are ~/.copilot, not ~/.github, which is the one created by rtk.

  2. even by moving the created files "rtk-rewrite.json" and "copilot-instructions.md" to the directories "/.copilot/hooks" and "/.copilot/instructions", the functionality still does not work. I can see that VS Code register the hook and the instruction, but the coding agent still does not preface terminal commands with rtk (as evidenced by the rtk gain report).

  3. by running rtk init -g --copilot --dry-run, the output doesn't show which operations would have been done.

  4. the documentation in the project README gives inconsistent instructions for initializing rtk for VS Code. In one code snippet, it says that the user should run rtk init -g for either claude code or copilot (although it doesn't specify if this works for copilot with VS Code). However, in other points of the documentation, it instructs the user to run rtk init -g --copilot.

All these evidences point to the conclusion that integration with VS Code + copilot is not being properly supported.

Workaround: by the way, I have managed to make rtk work by moving the two files to ~/.copilot (as described in item 3 above) and replacing the first line of the instructions file by the following lines:

---
applyTo: "**"
---

Contributor guide