Repository navigation
Benchmark a reply by its time, attributed to where it went - #3629
Merged
Merged
Conversation
The reply benchmark is now the time from the user's comment to the reply, attributed to Leaf's delivery, commands and hooks, the harness, the model's wait for its first output and its generation, and the agent's other tools. Model calls and output tokens remain only as diagnostics. This follows Max's decision #40 on the overnight report. Claude Code's debug log times each request, first byte and Leaf hook; Pi's RPC events give each response's first stream event and tokens; Codex App Server gives hook durations and per-response tokens, and its model time stays unsplit. journey-chart --replies tabulates each part's mean and share. The note's budgets are now in seconds, with a fresh batch of 18 journeys. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # dev/leaf_dev/journey_codex.py
leaf-agent
reviewed
Oct 22, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
The Pi breakdown needs one correction before its per-response timings and token counts can be trusted.
run_journey read Claude Code's transcript while the session was still writing it, and a partial last line failed the journey with a JSONDecodeError. The release reply is now broken down only in User.sample, from the session's whole record, like every other step's comment. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 22, 2026
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.
Benchmark a reply by its time, attributed to where it went
The reply benchmark now measures the time from the user's comment to the agent's reply and attributes all of it, each moment once, instead of counting model calls. This follows Max's decision #40 on the overnight report: a count of model calls is a noisy proxy for the time the user waits, so the benchmark and the note's budgets are now in seconds.
reply_phases.reply_breakdownsplits a reply into:Each harness's record supplies a different part of this:
The journey now breaks the release reply down once, after the session ends, from its whole record. The call that replied keeps its tokens, and reading Claude Code's transcript while it is still being written can no longer fail the journey on a partial line.
leaf-dev journey-chart --repliesprints a table with one column per target and case. Each part shows its mean and its share of the whole reply, and the parts add up to it. Model calls and output tokens remain only as diagnostic rows.notes/user-feedback-responsiveness.mdnow carries:In waiting replies the model took 82–92% of the time, mostly generation: Claude Code generated at about 100 tokens a second, nearly all of it thinking. Leaf's hooks took 1.0–1.6 s a reply on Claude Code and Codex; nothing counted them before this change.
The TODO entry asking what the reply budget counts is removed: the budget counts the whole reply. The website journey test's fake
run_journeyand its expected sample were stale against #3387 and #3403. They now takecommandsand expectcase.