Skip to content

Show elapsed time for running shell/tool calls in TUI and Web UI #50891

Open

Description

@BoYanZh

Feature

When a tool call (e.g. bash running a long command) is in flight, neither the TUI nor the Web UI shows how long it has been running:

  • TUI renders tool calls as static one-line rows (InlineTool in packages/tui/src/routes/session/index.tsx) with a spinner while running and no timing. Reasoning shows Thought · Xs only after completion, which is thinking time, not tool time.
  • Web UI (packages/session-ui) shows only per-assistant-message turn duration, never per-tool timing.

Part data already carries time.start/time.end; only the display plumbing is missing.

Proposal

  • TUI: live ticking elapsed badge on running tool parts, frozen total once finished (same · Xs format as the message meta).
  • Web UI: same per-tool timing in the tool trigger rows, reusing the existing ui.message.duration.* i18n strings.
  • Backward compatible: nothing renders while timestamps are unknown (pending parts carry none).

Activity

  1. basift commented on Sep 24, 2026

    @basift

    I am working on a related but distinct Desktop/Web case: the UI shows the final turn duration, but no live total while a long LLM inference, shell command, MCP call, or subagent is running. Per-tool timing in #50892 would not cover the total wall-clock interval across those steps. Older requests #27032 and #38666 were closed, and #38675 was not merged. I have a small frontend patch against current dev that starts on submit, ticks once per second near the composer, and freezes on completion or interruption; a production-build browser test covers a silent five-minute turn. Before opening a PR, would the team accept a persistent near-composer turn timer, or prefer another placement? I can adjust the patch to match the intended design.

  2. Nowaker commented on Oct 8, 2026

    @Nowaker

    #53877 covers the "frozen total once finished" half of this for the TUI. With "footer": { "time": "tool", "duration": "tool" } in tui.json, every finished tool call shows when it finished and how long it ran. That includes built-in, generic, plugin and MCP tools, e.g. $ npm run build · 3:41 PM · 12.4s. It doesn't add a live ticking timer while a call is still running, and it doesn't touch the Web UI.

    This comment is AI generated, but under direct supervision and on request of @Nowaker.

  3. opencodejr commented on Oct 28, 2026

    @opencodejr
    Contributor

    Thanks for the request, @BoYanZh! You'd like tool calls (especially long-running shell commands) to show a live elapsed-time badge in the TUI and the Web UI, frozen at the total once the call finishes. Currently v2 tool rows show no per-tool timing.

    Maintainers will consider it. Related items:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions