github / github/app

Title: Copilot App Repeatedly Calls apply_patch with Empty Content and Gets S...

Đang mở
#1,924 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Bugs
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
2.1k
Fork
153
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Title: Copilot App Repeatedly Calls apply_patch with Empty Content and Gets Stuck in a Loop

I would like to report an issue I've encountered when using GitHub Copilot App with GPT models (via BYOK).

In many coding tasks, Copilot frequently chooses to invoke the `apply_patch` tool. However, the generated tool call often contains no patch content, resulting in the following error:

`apply_patch requires a non-empty string input (the patch content).`

The main issue is not only the failed tool execution itself, but that Copilot repeatedly retries the same `apply_patch` call after the failure. The agent appears unable to recover from the error and can become stuck in a loop continuously invoking the same tool.

Observed behavior:

* Copilot decides to use `apply_patch`.
* The tool receives an empty patch.
* The tool returns the error above.
* The agent retries the same action.
* The process may repeat multiple times without making progress.
* Additional requests and credits are consumed during these retries.

Expected behavior:

* If an empty patch is generated, the agent should detect the issue before invoking the tool.
* After receiving this specific error, the agent should either regenerate the patch content or choose an alternative approach.
* The agent should avoid repeatedly invoking the same tool with identical invalid input.
* Tool failures should not result in an infinite retry loop.

Environment:

* Product: GitHub Copilot App
* Model: GPT model via BYOK
* Error message: `apply_patch requires a non-empty string input (the patch content)`

It would be helpful if the agent could include safeguards against empty patch submissions and implement retry limits for tool invocation failures.

Thank you for looking into this issue.

---
| Field | Value |
| --- | --- |
| App version | 1.0.21 |
| OS | macOS 13.7.6 |
| Theme | GitHub |
| Path | /chat |
| Tenure | Week 6 |

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện lệnh gọi `apply_patch` rỗng trong GitHub Copilot App 1.0.21 với một mô hình GPT thông qua BYOK, sau đó quan sát hành vi thử lại và lỗi được báo cáo. Được xem là hoàn tất khi các bản vá rỗng được ngăn chặn hoặc khôi phục, và các lỗi công cụ giống hệt lặp lại sẽ dừng mà không có vòng lặp không giới hạn hoặc các yêu cầu không cần thiết tiếp theo.

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

Đánh giá

Công nghệ
github
Lĩnh vực
ai, desktop, devtools
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
48/100

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.