Copilot CLI 1.0.117 omits edit from the model tool catalog in non-interactive mode

未關閉
#5,620 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

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

研究方向

The report identifies non-interactive tool catalog construction as the failing path and names the installed CLI package's index.js entry point; it does not identify the code that filters available tools. Start by tracing how --available-tools reaches the serialized model request in that entry point. Done means edit appears alongside view, rg, and glob when explicitly allowed, and the fixture can be changed under the stated permission.

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

描述

area:non-interactive area:tools
Describe the bug

When Copilot CLI 1.0.117 is run non-interactively with edit explicitly included in --available-tools, the serialized model request does not include the edit tool. The model receives only view, rg, and glob, so it cannot modify an explicitly permitted temporary fixture file. The same behavior occurs through both the VS Code Copilot shim and the installed CLI package's direct index.js entry point.

Affected version

1.0.117

Steps to reproduce the behavior

Create a temporary fixture.txt containing BEFORE.
Run Copilot CLI 1.0.117 non-interactively with edit included in --available-tools and write(path) permitted only for that fixture.

Command used (fixture path sanitized):

copilot.exe -p "Replace BEFORE with AFTER in fixture.txt. Do not use any other tools."
--available-tools "view,rg,glob,edit"
--allow-tool "write(C:\temp\copilot-edit-repro\fixture.txt)"
--no-ask-user

Ask Copilot to replace BEFORE with AFTER.
Observe that the fixture is not edited.
Debug logging shows that the model receives only view, rg, and glob; edit is absent (tool_count=3).
The same result occurs using both the VS Code Copilot shim and the installed CLI package's direct index.js entry point, with built-in MCPs enabled or disabled.

Expected behavior

When edit is explicitly included in --available-tools and write(path) permission is granted for the temporary fixture, edit should be included in the model tool catalog so the model can change fixture.txt from BEFORE to AFTER.

Additional context

Windows 11 Enterprise, Version 24H2, OS Build 26100.9168. Node.js v26.13.1. VS Code shim 0.1.2.

The behavior was identical using the VS Code shim and the installed Copilot CLI 1.0.117 index.js directly with Node, and with built-in MCPs enabled or disabled.

Sanitized debug evidence:

tool_count=3
tools=["view","rg","glob"]
fileChangesWorkspaceActive=false
fileChangesWorkspace=null

The actual temporary fixture path and identifying information have been sanitized. No full debug logs are attached.

主要語言
Python
星號
11.5k
分支
2k
平均合併
6 小時 34 分鐘
30 天內合併 PR
3

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

github/copilot-cli 的其他 Issue

查看 github/copilot-cli 的全部 Issue

相似的 Issue

更多 Python Issue

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

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