-
Notifications
You must be signed in to change notification settings - Fork 296
Description
Problem
When an MCP server (e.g. IntelliJ) blocks a tool call waiting for user confirmation on its side, docker-agent shows only an indefinite spinner (⟳ Working...). The user has no way to know:
- How long the tool call has been running
- That an external application needs attention
- What to do about it
This was observed with IntelliJ's MCP server blocking on execute_terminal_command confirmation while the docker-agent TUI appeared stuck indefinitely.
Screenshots
The TUI shows a tool call spinner with no duration or hint that IntelliJ needs attention:
Proposed Improvements
1. Elapsed time on running tool calls (low effort)
Add a StartedAt timestamp to tool call messages and render elapsed time next to the spinner:
⟳ Run tools with Javascript (2m15s)
Makes stuck calls immediately obvious.
2. Long-running tool call warning (low effort)
After a configurable threshold (e.g. 60s), display a warning in the TUI:
⚠ Tool call has been running for over 60s. The MCP server may be waiting for external input. Check the MCP server application for pending confirmations. Press Esc to cancel.
3. Configurable MCP tool call timeout (medium effort)
Wire the existing Toolset.Timeout config field (currently only used by fetch) to MCP CallTool via context.WithTimeout. Default could be ~5 minutes. On timeout, return a clear error message so the model can retry or switch tools.
Relevant Code Paths
pkg/tools/mcp/mcp.go—callTool()has no timeout, blocks indefinitely onts.mcpClient.CallTool(ctx, request)pkg/tui/types/types.go—Messagestruct has noStartedAtfieldpkg/tui/components/toolcommon/common.go—Icon()/RenderTool()show spinner with no durationpkg/config/latest/types.go—Toolset.Timeoutexists but is only wired forfetch