Skip to content

tui: show elapsed time and warning for long-running tool calls#2239

Open
dgageot wants to merge 1 commit intodocker:mainfrom
dgageot:board/mcp-lsp-call-interrupt-event-for-tui-81db302c
Open

tui: show elapsed time and warning for long-running tool calls#2239
dgageot wants to merge 1 commit intodocker:mainfrom
dgageot:board/mcp-lsp-call-interrupt-event-for-tui-81db302c

Conversation

@dgageot
Copy link
Member

@dgageot dgageot commented Mar 25, 2026

Summary

Add elapsed time display and a long-running warning to tool calls in the TUI, giving users visibility into how long MCP/LSP calls have been running and a hint to cancel if needed.

Changes

  • Add StartedAt timestamp to Message, set when a tool enters ToolStatusRunning
  • Display elapsed time next to the spinner for running tools (e.g. ⟳ 2m15s)
  • Show a warning after 60s: "⚠ Tool call running for over 60s. The MCP server may be waiting for external input. Press Esc to cancel."
  • Add unit tests for formatDuration and LongRunningWarning

Closes #2079

@dgageot dgageot requested a review from a team as a code owner March 25, 2026 07:27
Add a StartedAt timestamp to tool call messages, set when a tool
enters ToolStatusRunning. The TUI now displays elapsed time next to
the spinner (e.g. '⟳ 2m15s') and shows a warning after 60s hinting
that the MCP server may be waiting for external input and that
Esc can cancel the call.

Assisted-By: docker-agent
@dgageot dgageot force-pushed the board/mcp-lsp-call-interrupt-event-for-tui-81db302c branch from 3a19351 to 1d77693 Compare March 25, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve visibility of long-running / externally-blocked MCP tool calls

1 participant