microsoft / microsoft/vscode

🐛 Copilot agent-host sessions: `#` cannot reference tools (parity gap with Local chat)

Open
#336,521 0 comments 0 reactions 1 assignee Claimed by @roblourens View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

- Copilot Chat Extension Version: 0.41 (2026-03-25)
- VS Code Version: 1.139.0-insider (Universal)
- OS Version: macOS 15.7.7 (24G720)
- Feature (e.g. agent/edit/ask mode): Chat input `#` completions — Copilot (agent-host) vs Local
- Selected model (e.g. GPT 4.1, Claude 3.7 Sonnet): any
- Logs:

## Summary

Image

Agent-host Copilot sessions (e.g. `agent-host-copilotcli`) do not support `#tool` completions in the chat input. Local sessions do. `#file` still works on Copilot because the agent host has its own file completion provider; there is no equivalent tool completion provider.

## Expected

Type `#` in a Copilot session → tool completions appear (same as Local).

## Actual

Type `#` → No tools at all.

## Root cause (from source)

1. Built-in `ToolCompletions` short-circuits for agent-host widgets:

```ts
// src/vs/workbench/contrib/chat/browser/widget/input/editor/chatInputCompletions.ts
if (isAgentHostBackedWidget(widget)) {
// Agent-host sessions delegate completions to the host via AgentHostInputCompletions.
return null;
}
```

2. The agent host registers file / chat / skill / slash / rename providers, but **no tool provider**:

```ts
// src/vs/platform/agentHost/node/agentHostContributions.ts
completions.registerProvider(new AgentHostFileCompletionProvider(...)); // handles @ and # for files
// no AgentHostToolCompletionProvider
```

3. Session capabilities omit `supportsToolAttachments`:

```ts
// src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatContribution.ts
capabilities: {
supportsCheckpoints: true,
supportsPromptAttachments: true,
supportsImageAttachments: true,
// supportsToolAttachments missing
}
```

## Parity table

| | Local | Copilot (agent-host) |
|---|---|---|
| `#file` | built-in `BuiltinDynamicCompletions` | host `AgentHostFileCompletionProvider` |
| `#tool` | built-in `ToolCompletions` | **missing** |

## Suggested fix

Add an `AgentHostToolCompletionProvider` (mirroring `AgentHostFileCompletionProvider`) and/or set `supportsToolAttachments: true` on agent-host session capabilities.

## Related

- #319827 — added `#` as file completion trigger for agent host (files only)
- #288502 — `#tool:` references in skills (similar gap, different surface)

---

## Steps to Reproduce

1. Open Chat, switch session target to Copilot (agent-host).
2. Type `#` in the input → no tool completions.
3. Switch target to Local → type `#` → tool completions appear.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.