github / github/copilot-cli

Copilot CLI Infinite Loop on Empty bash Tool Call

Aberta
#1,444 2 comentários 0 reações 1 responsável Reivindicada por @MRayermannMSFT Ver no GitHub
area:tools
Linguagem predominante
Shell
Estrelas
11.2k
Forks
1.9k
Merge médio
14h 16min
PRs com merge (30d)
6

Descrição

### 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_

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.