github / github/copilot-cli

task_complete not written to output causes loss of actual result

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

描述

### Describe the bug

Regression/Related: https://github.com/github/copilot-cli/issues/1324

`copilot -p "some task e.g. review" --autopilot --model "claude-opus-4.6"` Sometimes has no meaningful output (e.g. Agent says it has everything to output a review but nothing is "written" to the output)

if you call `copilot -p "continue" --continue --autopilot --model "claude-opus-4.6"` it will tell you that the result is already in the task_complete and therefore it is done and has nothing further to do.

if you use `--excluded-tools task_complete` the agent will not terminate and tries to "search" for a way to terminate since everything is already done. Workaround: set `--max-autopilot-continues` to something low e.g. 3. But you still don't have access to the content of the task_completed result.

### Affected version

1.0.14

### Steps to reproduce the behavior

`copilot -p "some task e.g. review" --autopilot --model "claude-opus-4.6"` happens roughly in 1 of 10 tries.

### Expected behavior

The task_completed output is written to STDOUT

### Additional context

Workaround: add a task_completed hook to get the content. But since the agent sometimes outputs to STDOUT and sometimes via task_completed it requires some logic the fetch tp correct output.

貢獻指南

開啟貢獻指南

研究方向

Reproduce the issue with the `copilot -p` commands using `--autopilot`, `--continue`, and `--excluded-tools task_complete`, then trace how `task_complete` output is handled versus STDOUT. Confirm the fix by verifying that the task_completed result is written to STDOUT in cases where the agent does not otherwise produce meaningful output.

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

評估

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

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

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