github / github/app

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

オープン
#1,924 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
Bugs
主要言語
言語のデータがありません
スター
2.1k
フォーク
153
PR マージ指標
30日以内にマージされた PR はありません

説明

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 |

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

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

調査の方向性

まず、BYOK 経由で GPT モデルを使用して GitHub Copilot App 1.0.21 の空の `apply_patch` 呼び出しを再現し、その後、リトライの挙動と報告されたエラーを観察します。空のパッチが防止または復旧され、同一のツール失敗が繰り返された場合に、無限ループやこれ以上の不要なリクエストなしに停止すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
github
領域
ai, desktop, devtools
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

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

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