github / github/copilot-cli

bug: 'web'/'search' tool-category aliases silently resolve to no bound tool in headless --agent dispatch

未关闭
#4,023 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area:agents area:non-interactive area:tools
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

## Summary

When an agent's frontmatter declares tools using the category aliases `web` or
`search`, those aliases silently resolve to **no bound tool at all** when the
agent is dispatched headlessly via `copilot --agent -p ... --allow-all-tools`.
There is no error or warning — the agent simply has no web-fetch/web-search
capability, which is easy to miss since nothing fails loudly.

Other category aliases in the same position work correctly: `read` → `view`,
`edit` → `edit`, `shell` → `powershell`, `agent` → `task/read_agent/list_agents`.
Only `web` and `search` are affected.

## Environment

- GitHub Copilot CLI 1.0.68 (Windows)
- Invocation: `copilot --agent -p "" --allow-all-tools`

## Repro

Agent frontmatter:
```yaml
---
name: tool-probe
tools:
- read
- web
- search
---
```

Dispatch:
```
copilot --agent tool-probe -p "List every tool you have available to you right now, one per line, then stop." --allow-all-tools
```

**Observed bound tools:** view, skill, sql — no web/search tool at all.

Changing the frontmatter to the literal tool names instead of the category aliases:

```yaml
tools:
- read
- web_fetch
- web_search
```

**Observed bound tools:** view, web_fetch, web_search, skill, sql — correct.

## Impact

Any agent relying on the documented web/search category aliases for web
access has zero web tooling in headless dispatch, with no error surfaced
anywhere. We found this affected 5 of our own agent specs (including a
Chief-of-Staff-style orchestrator whose own web lookups were silently broken)
before switching to literal tool names as a workaround.

## Suggested fix

Category-alias resolution for web/search should map to web_fetch/web_search
in headless --agent dispatch mode the same way shell correctly maps to
powershell and read maps to view.

贡献指南

打开贡献指南

调研方向

首先使用文档化的 web/search 复现步骤,跟踪 headless --agent 分发期间 frontmatter 工具的类别别名解析。将这些别名与 read 和 shell 进行比较,然后验证 web_fetch/web_search 的字面行为。当 web 和 search 在 headless 分发中绑定预期工具,并且静默失败由回归检查覆盖时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
shell
领域
cli
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
68/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。