Skip to content

feat(tools): run a clock on a tool that is still going - #25

Merged
ericleepi314 merged 1 commit into
mainfrom
running-clock
Aug 19, 2026
Merged

feat(tools): run a clock on a tool that is still going#25
ericleepi314 merged 1 commit into
mainfrom
running-clock

Conversation

@ericleepi314

Copy link
Copy Markdown
Collaborator

What

A running tool's row said Running… and nothing else, for as long as it took.

before                                                  after
⏺ Bash(for i in 1 2 3 4 5 6 7 8; …)                    ⏺ Bash(for i in 1 2 3 4 5 6 7 8; …)
  ⎿  Running…                                            ⎿  Running… (8s)

Claude Code 2.1.235 runs a live clock on it — a shell call reads $ <cmd> (6s · 7 lines) while it works, so a reader can tell a slow command from a hung one without interrupting to find out.

What can't be matched, and why

The line count needs output while the tool is still running, and deepseek-harness publishes nothing at all between tool/call and tool/result. Traced every event on the bus during a command that prints for eight seconds:

session/event tool/call
session/event session/title
session/event tool/result

So the elapsed half is what can be told truthfully, and that is what the row carries. No progress channel is faked.

Details

Held back for the first second, so a call that returns immediately never flashes a (0s). It rides the 500 ms ticker that already drives the blinking bullet — no new timer.

Test

  • npm run typecheck, npm test — 150 files / 1950 passing
  • node scripts/verify-boundary.mjs
  • two new render cases in toolBrief.test.ts: the clock shows at 6s, and never renders (0s)
  • new bash_stream gallery scenario — a command that emits over time is the only way to see a running row at all

🤖 Generated with Claude Code

A running tool's row said `Running…` and nothing else, for as long as it
took. Upstream runs a live clock on it — a shell call reads
`$ <cmd> (6s · 7 lines)` while it works, so a reader can tell a slow
command from a hung one without interrupting to find out.

The line count needs output while the tool is still running, and
deepseek-harness publishes nothing at all between `tool/call` and
`tool/result` — verified by tracing every event on the bus during a
command that prints for eight seconds. So the elapsed half is what can be
told truthfully, and that is what the row now carries:

    ⏺ Bash(for i in 1 2 3 4 5 6 7 8; do echo line-$i; sleep 1; done)
      ⎿  Running… (8s)

Held back for the first second, so a call that returns immediately never
flashes a `(0s)`. It rides the ticker that already drives the blinking
bullet, so there is no new timer.

Also adds a `bash_stream` gallery scenario — a command that emits over
time is the only way to see a running row at all.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ericleepi314
ericleepi314 merged commit c6d9930 into main Aug 19, 2026
1 check passed
@ericleepi314
ericleepi314 deleted the running-clock branch August 19, 2026 14:55
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.

1 participant