github / github/copilot-cli

Built-in agents (explore, task, code-review) do not inherit custom instructions

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

説明

### Describe the bug

Built-in agents (`explore`, `task`, `code-review`) do not follow custom instructions. For example, with the instruction "Never use system python. Use `uv run python ...` instead", these agents still invoke `python` or `python3` directly. This causes two problems:

1. The agent's work is interrupted by a permission prompt (since `uv` is permitted via `--allow-tool` but `python` is not). And I have to navigate them to use `uv` to each agents.
2. Project packages are unavailable in the system Python environment, which can cause scripts to fail.

This is not limited to Python execution. For example, the instruction "never use /tmp" is also ignored by these agents.

### Affected version

GitHub Copilot CLI 1.0.3.

### Steps to reproduce the behavior

1. Add custom instruction: "Never use system python. Use `uv run python ...` instead"
2. Ask copilot: "Ask all built-in agents this question and report the result: When you are asked to run a python script, for example test.py, what command will you execute?"

Response example (claude-sonnet-4.6 (medium)):
```
Here are the results from all 4 built-in agents:

| Agent | Command |
|---|---|
| **explore** | `python3 test.py` (or `python test.py`) |
| **task** | `python test.py` (default), `python3 test.py` if Python 3 is needed |
| **general-purpose** | `uv run python test.py` |
| **code-review** | `python test.py` (or `python3 test.py` depending on environment) |

**Key finding:** Only the **general-purpose** agent correctly follows the custom instruction ("Never use system python. Use `uv run python ...` instead"). The other three agents (`explore`, `task`, `code-review`) would use `python` or `python3` directly — which is **non-compliant** with the environment's configuration.

If you need Python scripts run correctly in this environment, prefer the **general-purpose** agent, or explicitly instruct the others to use `uv run python`.
```

### Expected behavior

All sub-agents should have access to and comply with the user's custom instructions, consistent with how the general-purpose agent already behaves.

### Additional context

_No response_

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

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

評価

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

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

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