github / github/copilot-cli

Agent skips $HOME/.copilot/ when searching for MCP/env config files

未關閉
#2,578 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
area:configuration area:mcp
主要語言
Shell
星號
11.2k
分支
1.9k
平均合併
14 小時 16 分鐘
30 天內合併 PR
6

描述

### Describe the bug

When asked to locate a file like ado-mcp.env, the agent searched only the repo directory and then escalated to a drive-root scan
— skipping $HOME/.copilot/ entirely, despite the documentation explicitly listing it as a profile-level config directory.

The agent should apply file-type reasoning first (.env + ado-mcp prefix → MCP config → ~/.copilot/), check the documented lookup
order (repo → repo root → $HOME/.copilot/), and only ask the user if all three fail — never scan from drive root.

This is a tool-first, reasoning-last anti-pattern that should be corrected in the agent's lookup heuristics.

[bug-conversation.txt](https://github.com/user-attachments/files/26563816/bug-conversation.txt)

### Affected version

GitHub Copilot CLI 1.0.21.

### Steps to reproduce the behavior

1. save ado mcp details in ~/.copilot/ado-mcp.env
2. go to your repo folder
3. ask: create pull request

### Expected behavior

it should have look into ~/.copilot folder for env file

### Additional context

Operating system: windows 11
processor : x86_64
terminal: windows terminal
bash: git bash

貢獻指南

開啟貢獻指南

研究方向

Start by reproducing the lookup from a repository on Windows 11 with ~/.copilot/ado-mcp.env present, and review the attached bug-conversation.txt alongside the documented lookup order. Done means the agent checks the repository, repository root, and $HOME/.copilot/ before asking the user, without escalating to a drive-root scan.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
shell
領域
cli, tooling
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
冷清
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。