feat(cli): per-turn summary line and live token flow in the spinner - #72246
Merged
Conversation
Contributor
૮ >ﻌ< ა ci reviewran on e0372d0 ℹ️ InfoDesktop E2E visual evidence · View test artifacts · View job1 visual diff. inline evidence upload failed. Failed to upload diff-665a0833239e-onboarding-overlay-diff.png with gh image (exit code 1): Error uploading /home/runner/work/_temp/e2e-evidence/diff-665a0833239e-onboarding-overlay-diff.png: step 0 (get upload token): uploadToken not found on repo page — do you have write access to NousResearch/hermes-agent? (or, if NousResearch enforces SAML SSO, authorize at https://github.com/orgs/NousResearch/sso) |
Ports Claude Code's post-turn accounting (Edited N files +X -Y · Worked for Ns). Display-only, quiet-mode aware, config-gated.
…f +0 -0 Found by E2E-rendering the collector against realistic tool payloads.
teknium1
force-pushed
the
ux/turn-summary
branch
from
July 26, 2026 23:21
c2896d0 to
e0372d0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every completed CLI turn now ends with a one-line accounting of what it did —
⋯ 12.4s · edited 2 files +18 -3 · read 4 files · ran 3 commands— and the spinner shows live token flow while the turn runs. Previously Hermes told you nothing about a turn's cost or footprint once the response landed.Ported from Claude Code, observed live: I ran CC 2.1.220 in a tmux PTY through real edit tasks and watched it print
Edited 1 file +6 -2, read 1 file, listed 1 directory/✻ Worked for 10safter each turn, with✢ Scurrying… (2s · ↓ 32 tokens)during.How it works
Display-only, zero agent-loop state: the collector rides the tool-progress feed the CLI display already receives (every
tool.completedevent carries the tool name and raw result), so nothing new is threaded throughrun_agent.py. Line deltas come only from tools that already report a diff in their result payload — never by shelling out to git, never by re-reading files. Failed tool calls are excluded so the line can't over-claim "edited 2 files" when a write was denied.Changes
agent/turn_summary.py—TurnSummaryCollector+ pure formatters (format_turn_summary,format_token_flow,format_elapsed)cli.py— collector wired into the existing tool-progress handler + spinner token flowhermes_cli/config.py—display.turn_summary,display.spinner_token_flow(both default true, no_config_versionbump)website/docs/user-guide/configuration.md— both keys documentedtests/agent/test_turn_summary.py— 44 testsGated: CLI-only (never gateway — that surface has its own runtime footer), suppressed in quiet/non-interactive/batch, both keys individually disable-able.
Validation
scripts/run_tests.sh tests/agent/test_turn_summary.py⋯ 12.4s · edited 1 file +2 -1 · read 1 file · ran 1 commandE2E found a defect the unit suite missed: a diff carrying no
+/-content lines (bare hunk header) rendered a misleading+0 -0beside a real edit. Fixed to report unknown deltas instead, with a regression test.Infographic