Skip to content

bench: count textEmissions from session transcript, not stdout - #317

Merged
dahai80 merged 1 commit into
mainfrom
bench/textemit-from-transcript
Nov 23, 2026
Merged

dahai80 merged 1 commit into
mainfrom
bench/textemit-from-transcript

Conversation

@dahai80

@dahai80 dahai80 commented Nov 23, 2026

Copy link
Copy Markdown
Owner

Problem

When a bench task hits the 600 s cap, the runner kills the process and buffered stdout is lost. T17 (27B full run) ended with a plain-text call_<id>{...} tool-call emission in its session transcript, but textEmit reported 0 — the degradation metric missed exactly the case it exists for.

Fix

copySessionTranscript now returns the copied transcript path; when present, textEmissions is counted from assistant text blocks in the transcript instead of stdout. Falls back to stdout counting for harnesses without transcripts (goose/opencode unchanged).

Validation

  • tsc --noEmit --strict clean; Biome rule set identical to base.
  • Counted against the real degraded T17 transcript: transcript method = 1, stdout method = 0.

🤖 Generated with Claude Code

Process stdout is lost when a timed-out task is killed mid-emission.
Observed on T17 (27B full run): the session transcript ends with a
plain-text call_<id>{...} tool-call emission but stdout never carried
it, so textEmit underreported 1 -> 0 and the degradation was invisible
in the summary. Prefer the transcript (copySessionTranscript now
returns the copied path); fall back to stdout counting for harnesses
without transcripts. Verified: T17 transcript counts 1, stdout counted 0.

Co-Authored-By: Claude Code <[email protected]>
@dahai80
dahai80 merged commit d095509 into main Nov 23, 2026
1 check passed
@dahai80
dahai80 deleted the bench/textemit-from-transcript branch November 23, 2026 09:20
@dahai80 dahai80 mentioned this pull request Nov 23, 2026
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