github / github/copilot-cli

Copilot CLI Infinite Loop on Empty bash Tool Call

Offen
#1,444 2 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @MRayermannMSFT Auf GitHub ansehen
area:tools
Vorherrschende Sprache
Shell
Sterne
11.2k
Forks
1.9k
Ø Merge
14 Std. 16 Min.
Gemergte PRs (30 T.)
6

Beschreibung

### Describe the bug

The Copilot CLI gets stuck when invoking a bash command with empty arguments. The command is invalid and results in an error, but instead of stopping, it repeatedly issues the same tool call over 5000 times until the process is eventually killed.
Specifically, the model keeps generating the following tool call with empty arguments:
```
{
"choices": [
{
"finish_reason": "length",
"message": {
"role": "assistant",
"tool_calls": [
{
"function": {
"arguments": "{}",
"name": "bash"
},
"id": "toolu_vrtx_01X5EZSmMahBSaU8p21MvQH8",
"type": "function"
}
]
}
}
],
"created": 1770869340,
"id": "msg_vrtx_012HHnioZgNQg77QVLyuDMJ8",
"usage": {
"completion_tokens": 16000,
"prompt_tokens": 32127,
"prompt_tokens_details": {
"cached_tokens": 31973
},
"total_tokens": 48127
},
"model": "claude-sonnet-4.5"
}
```

Let me know if you want more information.

### Affected version

0.0.407-1

### Steps to reproduce the behavior

_No response_

### Expected behavior

If the tool call is failure, shall llm correct it?

### Additional context

_No response_

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.