release: subagent live progress + transcript (#594)
Merged
SW
5mo ago+343+343+012345678901234567890123456789-149-149-012345678901234567890123456789
Summary
- Converts
taskTool.executetoasync function*yielding open-agents' 4-stage progress sequence (initial โ tool-call pending โ finish-step usage โ final transcript) toModelOutputextracts last assistant text fromoutput.finalfor parent agent context- New
sumLanguageModelUsagehelper (SRP) - Drive-by: fixes
askUserQuestionTool.toModelOutputsignature for the new SDK (was a latent bug from the older beta SDK)
Test plan
- 25 new/updated unit tests; full suite 3114/3114 pass
- E2E on preview: 6
tool-output-availablechunks emitted in expected order - Cross-validated yield sequence against open-agents production โ byte-identical (same chunk count, same field sets on every yield)
-
toModelOutputconfirmed end-to-end: parent agent correctly relayed subagent's summary
๐ค Generated with Claude Code
Summary by cubic
Adds live progress streaming for the task subagent by converting taskTool.execute to an async generator, so the UI can show pending tool-calls, running usage totals, and the final transcript. Also extracts the last assistant text for parent context and fixes askUserQuestionTool.toModelOutput to read the SDKโs { output } shape.
-
New Features
taskTool.executenow yields: initial{ startedAt, modelId, toolCallCount: 0 }, apending { name, input }on each tool-call, accumulatedusageon each finish-step, and a final{ final: ModelMessage[] }transcript.taskTool.toModelOutputreturns the last assistant text fromoutput.final.- Added
sumLanguageModelUsageto safely accumulate per-step usage.
-
Bug Fixes
askUserQuestionTool.toModelOutputnow uses({ output })so user answers are correctly surfaced.