`-p` mode fails if agent succeeds but does not print any conclusion

Đang mở
#5,574 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
cli

Hướng nghiên cứu

Start by tracing the -p prompt flow that handles an agent completing work without producing a final response, and inspect the code that reports the empty-response error and sets the exit code. Reproduce with the command in the issue, then check whether the agent made changes before deciding whether the run should succeed. Done means a run that made changes and printed no conclusion exits with code 0 without an error; a run that did nothing should retain the reported behavior.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area:non-interactive
Describe the bug

We have automation that runs copilot with -p, asks the agent to do something and exit. It used to work fine until 1.0.114. Since 1.0.115 the agent is still able to complete its task, but copilot then prints an error message and exits with an error exit code, making the automation think the agent failed.

Affected version

GitHub Copilot CLI 1.0.115.

Steps to reproduce the behavior
$ copilot --model gpt-5.6-luna --effort low --prompt 'Write "test" into foo.txt, then exit without saying anything.'; echo EXIT-CODE: $?
 $ Shell Write test to foo.txt No Content
   printf 'test' > foo.txt


Error: The model returned an empty response, so the run produced no answer.


Changes    +0 -0
AI Credits 0.54 (12s)
Tokens     ↑ 56.1k (37.9k cached, 18.3k written) • ↓ 102 (64 reasoning)
Resume     copilot --resume=c51f8d52-0c32-4e5a-a58c-7e37e6c81f67
EXIT-CODE: 1
Expected behavior

Succeeds, does not print an error message, and exits with 0.

Additional context

Please only trigger the behavior if the agent didn't do anything at all, or add an option to disable it.

Ngôn ngữ chính
Python
Star
11.5k
Fork
2k
Merge trung bình
6 giờ 34 phút
Pull request đã merge (30 ngày)
3

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của github/copilot-cli

Tất cả issue của github/copilot-cli

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.