github / github/copilot-cli

MCP sampling/createMessage response includes system prompt text in content

オープン
#2,467 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:mcp
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

### Describe the bug

When an MCP server sends a `sampling/createMessage` request, the Copilot CLI correctly routes it to the LLM and returns a response. However, the response content prepends the entire system prompt text before the LLM's actual answer.

### Affected version

GitHub Copilot CLI 1.0.16-0

### Steps to reproduce the behavior

1. Configure an MCP server that uses `sampling/createMessage` with a system prompt
2. Have the server send a sampling request where it expects a specific response format
3. Approve the sampling request when prompted
4. Observe the response content includes the system prompt prepended to the LLM's answer

### Expected behavior

The `CreateMessageResult.Content` should contain only the LLM's response text, e.g.:

```
=== FALSE
```

### Additional context

## Actual behavior

The response content contains the system prompt echoed back, followed by the LLM's answer:

```
... === FALSE
```

## Note

This works correctly in VS Code's MCP sampling implementation — the system prompt is not included in the response content.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。