Repository navigation
feat(bench): per-task token totals in runner rows and summary - #358
Merged
Merged
Conversation
Cost-per-task anchoring (SWE-Lancer practice: quality must be reported with cost). The runner already copies the session transcript per task; assistant entries carry the engine's usage block, so sumTokensFromTranscript totals input/output tokens best-effort (missing transcript or usage fields count as zero and never fail a run). Row log line gains tokens=<in>/<out>; summary.json gains tokensIn/tokensOut totals. Sanity-checked on the 2026-11-26 run transcripts (T19: 107366 in / 452 out). Co-Authored-By: Claude Code <[email protected]>
This was referenced Nov 26, 2026
Merged
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.
What
Adds cost-per-task telemetry to the harness-gain runner (SWE-Lancer practice: quality must be reported with cost).
sumTokensFromTranscript()sumsinput_tokens/output_tokensfrom assistant usage blocks in the per-task session transcript (best-effort; missing transcript/fields = 0, never fails a run).HarnessRungainstokensIn/tokensOut; row log line gainstokens=<in>/<out>;summary.jsongainstokensIn/tokensOuttotals.Verification
bun build --no-bundleclean.Follow-up
Next rerun records the first full cost-per-task table for the report; combined with wall seconds this enables resolve-rate-per-token comparisons across tiers.
🤖 Generated with Claude Code