Skip to content

[FEATURE]: Show per-part timestamps for thinking, tool calls, and tool output in the TUI #42498

Open

Description

@ImBIOS

Describe the enhancement you want to request

The TUI has a /timestamps toggle (session.toggle.timestamps) that shows the message-level creation time under each message. There is currently no way to see when each individual block happened — thinking, tool invocation (e.g. bash command), and tool output — which makes it hard to tell whether a long-running agent is stalled in one step or just slow.

Requested: when timestamps are enabled, each part should render its own start timestamp (using part.time.start):

  • Thinking block header: Thought: plan migration · 2.3s · 3:41 PM
  • Tool invocation (inline): $ npm run build · 3:41 PM
  • Tool block header (bash output, reads, etc.): # Running in packages/tui · 3:41 PM
  • Message-level timestamp stays as-is

Parts already carry time.start/time.end in the protocol (packages/schema/src/v1/session.ts), so this is a pure TUI rendering change.

Why this would be useful

  1. Detect stalls: see that a tool call has been running since 3:41 PM without output
  2. Correlate agent activity with git commits / CI logs / deploys
  3. Audit long sessions where multiple runs happen close together

Related issues

Activity

  1. github-actions commented on Aug 14, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If this is intentionally a narrower or differently-scoped follow-up to those issues, it would help to clarify what specifically is new beyond what was tracked in #22144 and #35348.

  2. Nowaker commented on Oct 7, 2026

    @Nowaker

    A design for this, implemented in the PR linked below.

    Today the transcript can show a time in two places only: under a prompt (/timestamps) and, with #53195, in the assistant turn footer (turn_timing.time, /turn-times). Thinking blocks, tool calls, text blocks, error boxes and the compaction divider never do. The tool and reasoning parts already carry time.start/time.end, so this is a TUI-only change.

    Proposal: one timestamps option in tui.json that names the transcript entries showing a timestamp.

    • "all", "none", a comma-separated list ("user,tool"), or an array (["user", "tool"]).
    • Types: user, assistant, text, reasoning, tool, error, compaction.
    • Each part shows when it finished rather than when it started, because a finished time plus a duration tells you both: tool calls show end · duration, thinking blocks put the time before their existing duration.
    • Same format as feat(tui): show per-turn completion time and duration #53195: time of day if today, otherwise the date then the time.
      ┃  run the steps
      ┃  8:04 PM
         + Thought: 8:05 PM · 359ms
         Looking around first.
         8:05 PM
         ✱ Glob "*" (1 match) · 8:05 PM · 500ms
      ┃  $ echo hello
      ┃  hello
      ┃  8:05 PM · 666ms
         ▣  Build · Fake · 8:05 PM
    

    Compatibility: unset is the default and changes nothing. /timestamps, /turn-times and turn_timing.time work and persist exactly as now. Once set, the list decides every type on each start and overrides turn_timing.time. /timestamps and /turn-times still flip prompt and turn times, but only until the TUI exits. If the kv value won instead, the option would do nothing on most existing installs: kv.json usually already holds "timestamps", because the kv store writes its in-memory defaults along with any other write.

    A stall shows as a running tool with no timestamp yet. I did not add a live "running since" clock; #50891 covers elapsed time for running calls.

  3. opencodejr commented on Oct 28, 2026

    @opencodejr
    Contributor

    Thanks for the detailed request, @ImBIOS! As I understand it, you'd like each part in the TUI (thinking blocks, tool calls and tool output headers) to show its own start time when timestamps are enabled, not just the time under each message, so stalls are easy to spot and activity can be matched against commits and CI logs.

    One note: the /timestamps toggle (session.toggle.timestamps) is from OpenCode v1 (opencode-ai, 1.x). The v2 TUI (@opencode/cli, 2.x) doesn't have a timestamp toggle yet, so in v2 this would also mean adding that toggle. The current TUI plugin API has no slot for individual parts in the session view, so a plugin can't add this for now.

    Maintainers will consider it. Related issues:

  4. Josef-Le commented on Nov 1, 2026

    @Josef-Le

    +1. Please cover both individual tools and each assistant response, including intermediate responses that end in tool calls. Related assistant-turn request: #53192.

    Item Proposed display
    User message Sent · 14:02:11
    Assistant response Assistant · 14:02:12 → 14:02:15 · 3.4s
    Tool call shell · 14:02:13 → 14:02:14 · 1.2s
    Running call shell · 14:02:13 · running; show finish and duration when it completes
    Controls Boolean config setting, /timestamps, command-palette toggle, and configurable keybind

    Use compact, dimmed local HH:MM:SS times and compute durations from stored millisecond values, including across midnight. Keep existing behavior when disabled. When enabled, individual tool timing should remain visible rather than disappearing into collapsed groups. Persist the toggle in configuration so restarts retain the choice.

    This makes it possible to correlate activity with logs and distinguish a queued tool from a running or completed tool without exporting a session.

    🤖 Authored by an agent on behalf of @Josef-Le.

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

Metadata

Metadata

Assignees

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