-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Copilot CLI Infinite Loop on Empty bash Tool Call #1444
Copy link
Copy link
Open
Labels
area:toolsBuilt-in tools: file editing, shell, search, LSP, git, and tool call behaviorBuilt-in tools: file editing, shell, search, LSP, git, and tool call behavior
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:toolsBuilt-in tools: file editing, shell, search, LSP, git, and tool call behaviorBuilt-in tools: file editing, shell, search, LSP, git, and tool call behavior
Type
Fields
Give feedbackNo fields configured for Bug.