github / github/copilot-cli

--agent <agent name> does not work with --plugin-dir <dir> -p <prompt>

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

描述

### Describe the bug

When I use --agent with --plugin-dir -p , it starts scanning the .copilot or .github directory for .
Though this agent is present in the plugin-dir, copilot is not able to find it.

**If I don't pass -p , the copilot TUI opens and I can see the agent selected.**

I am using the version 1.0.31 (latest)

### Affected version

_No response_

### Steps to reproduce the behavior

1. Download a plugin to a directory, with a "agent/.agent.md"
2. pass the same agent name as "copilot --agent --plugin-dir " -> You will see the TUI showing "agent name" selected
3. Now pass with -p switch "copilot --agent --plugin-dir -p 'hi' " -> This will error out saying the agent is not available

### Expected behavior

(With and without -p) and with --plugin-dir and with --agent, copilot should be able to find the right agent

### Additional context

_No response_

貢獻指南

開啟貢獻指南

研究方向

Reproduce the issue with a plugin containing agent/.agent.md, first without -p and then with `copilot --agent --plugin-dir -p 'hi'`. Trace how agent discovery differs between the TUI and prompt modes; done means the plugin agent is found and selected in both invocations.

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

評估

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

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

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