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
{{ message }}
Repository navigation
rtk init -g --copilot writes to wrong global path for Copilot CLI #2242
rtk init -g --copilot writes copilot-instructions.md to ~/.github/copilot-instructions.md, but Copilot CLI reads global custom instructions from ~/.copilot/copilot-instructions.md.
This means the RTK instructions are never loaded by Copilot CLI.
Steps to Reproduce
rtk init -g --copilot
Output:
[ok] Added Copilot instructions to ./.github/copilot-instructions.md
File created at ~/.github/copilot-instructions.md — Copilot CLI does not read this path.
Expected Behavior
RTK should write to ~/.copilot/copilot-instructions.md (the path Copilot CLI actually reads for global user-level instructions).
Reference: Copilot CLI docs list these instruction sources:
$HOME/.copilot/copilot-instructions.md ← global user-level
.github/copilot-instructions.md ← project-level (git root)
Additional Context
rtk-rewrite.json in ~/.github/hooks/ is also ineffective since Copilot CLI has no PreToolUse hook mechanism (unlike Claude Code).
The only way RTK can work with Copilot CLI is via prompt instructions, so getting the file path right is critical.
rtk init -g --copilot writes to wrong path (~/.github/ instead of ~/.copilot/) making Copilot CLI never load the instructions; fix the global path constant.
This looks like a simple fix that could be auto-resolved. Repo maintainers can use /wshm fix to attempt it.
Fixed by #2101, shipped in v0.42.3: rtk init -g --copilot now writes ~/.copilot/copilot-instructions.md (plus ~/.copilot/hooks/rtk-rewrite.json) instead of ~/.github, so Copilot CLI picks the instructions up. Verified on the current branch with HOME pointed at a scratch directory. If the CLI still misses them on the latest version, comment here and we'll reopen.
Activity
pszymkowiak commentedon Jun 3, 2026
🔍 Automated Triage
bughighSummary
rtk init -g --copilot writes to wrong path (~/.github/ instead of ~/.copilot/) making Copilot CLI never load the instructions; fix the global path constant.
📁 Relevant files
src/init.rssrc/cli/init.rsTriaged automatically by wshm · This is an automated analysis, not a human review.
ConorLindsay94 commentedon Jun 11, 2026
To get this working in VSCode:
rtk init -gchat.useHooksUse Claude Hookslmmzss-jk commentedon Jun 11, 2026
The scenario I use most often is the CLI.
KuSh commentedon Sep 13, 2026
Fixed by #2101, shipped in v0.42.3:
rtk init -g --copilotnow writes ~/.copilot/copilot-instructions.md (plus ~/.copilot/hooks/rtk-rewrite.json) instead of ~/.github, so Copilot CLI picks the instructions up. Verified on the current branch with HOME pointed at a scratch directory. If the CLI still misses them on the latest version, comment here and we'll reopen.