github / github/copilot-cli

Copilot CLI Infinite Loop on Empty bash Tool Call

Đang mở
#1,444 2 bình luận 0 reaction 1 người được giao Được @MRayermannMSFT nhận Xem trên GitHub
area:tools
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

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

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

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

Đánh giá

Issue này chưa được đánh giá.

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.