-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Describe the bug
When an MCP tool call blocks for an extended period (e.g., a tool that waits for an external event before returning), the CLI's progress indicator produces repeated lines in the terminal instead of updating the existing line in-place.
○ my_long_running_tool
◉ Waiting for result (Esc to cancel · 55 B)
○ my_long_running_tool
∙ Waiting for result (Esc to cancel · 55 B)
○ my_long_running_tool
◎ Waiting for result (Esc to cancel · 55 B)
○ my_long_running_tool
◉ Waiting for result (Esc to cancel · 55 B)
○ my_long_running_tool
∙ Waiting for result (Esc to cancel · 55 B)
This repeats every few seconds and continues for the duration of the tool call, filling the screen with duplicate lines. The same behavior also occurs with read_agent(wait: true) calls on background agents, producing repeated "Waiting for result…" lines.
Steps to reproduce
- Create an MCP server with a tool that blocks for a long time (e.g., waits on a semaphore, external signal, or long timeout before returning)
- Configure the server in
mcp.jsonwith a long timeout:{ "mcpServers": { "my-server": { "command": "my-server", "args": [], "timeout": 3600000 } } } - Have the agent call the blocking tool
- Observe the terminal — the progress indicator line is appended repeatedly instead of being updated in-place
Expected behavior
The progress indicator for a pending tool call should update the same line in the terminal (using ANSI cursor control), not append a new line on each spinner tick. A single long-running tool call should produce at most one visible progress line that animates its spinner character in-place.
Affected version
- Copilot CLI version: 0.0.414
- OS: Windows 11 (Windows Terminal)
- MCP server timeout: configured at 3,600,000ms (1 hour)
Additional context
- The
timeoutconfig inmcp.jsonis working correctly — the tool is NOT timing out or retrying - The spinner characters (
◉,∙,◎) cycle, suggesting it's the same animation intended to update one line - This makes patterns like "launch a background agent, block on MCP tool until it signals completion" impractical, since the main terminal fills with noise while waiting