Skip to content

agent: Add turn statistics to agent panel#46390

Merged
mikayla-maki merged 8 commits intomainfrom
add-a-timer-to-agent-threads
Jan 9, 2026
Merged

agent: Add turn statistics to agent panel#46390
mikayla-maki merged 8 commits intomainfrom
add-a-timer-to-agent-threads

Conversation

@mikayla-maki
Copy link
Member

@mikayla-maki mikayla-maki commented Jan 8, 2026

I really enjoyed this feature in Claude Code. Helps me get a sense of how effortful something is.

Release Notes:

  • Added a "show_turn_stats" setting, default to false, that shows the timer, the number of tokens, and whose turn it is.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 8, 2026
@mikayla-maki mikayla-maki changed the title Add a timer to agent threads agent: Add turn statistics to agent panel Jan 8, 2026
@mikayla-maki mikayla-maki marked this pull request as ready for review January 9, 2026 00:23
@mikayla-maki mikayla-maki enabled auto-merge (squash) January 9, 2026 00:24
@mikayla-maki mikayla-maki merged commit 06bd900 into main Jan 9, 2026
24 checks passed
@mikayla-maki mikayla-maki deleted the add-a-timer-to-agent-threads branch January 9, 2026 00:33
@wzulfikar
Copy link

Saw this PR and checked it. Thank you!

One question: Would it be nice to keep the stats in same position, eg. at left side instead of right, so that it doesn't move when the agent is done?

Screen.Recording.2026-01-09.at.10.32.55.AM.mov

@wzulfikar
Copy link

wzulfikar commented Jan 9, 2026

Managed to create an example. I can open PR if that's okay.

  1. Turn stats always shown in left side of thread controls
  2. When generating is done, the undo icon can be clicked to move input focus to last user's message
ux-zd-turn-stats.mov.mp4

@quinncomendant
Copy link

This is really nice @mikayla-maki – super useful for getting a feeling of the agent working (and cost).

One thought: the current duration is measured from send, which mixes time to first token with throughput (how fast tokens stream once they start). For comparing different models/providers, it would be valuable to also surface a throughput indicator calculated as:

throughput = output_tokens / (last_token_at - first_token_at)

i.e. time between first and last token only.

That would let us distinguish “slow to start but fast once streaming” from “fast to start but decodes slowly,” instead of collapsing both behaviors into a single wall-clock duration. Since output_tokens is already tracked, it may just require capturing first_token_at / last_token_at per turn and wiring that into the existing turn stats UI.

I know this PR has already merged, but I wasn’t sure where else to write this comment. Thanks for reading.

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

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants