1 Commits

Author SHA1 Message Date
Yuzhong Zhang
8eda71fd97
fix(agents): normalize Command-wrapped tool results (#4977)
* fix(agents): normalize Command-wrapped tool results

Command-wrapped ToolMessages skipped result metadata and progress
tracking, so error receipts could be recorded as success.

* fix(agents): stamp error meta from subagent_status failures

Delegated task Commands leave ToolMessage.status at success and do not
use an Error: content prefix, so normalize_tool_message was labeling
failed/cancelled/timed_out results as success. Honor structured
subagent_status before content heuristics and cover the four statuses.

* style: ruff-format tool_result_meta tests

---------

Co-authored-by: Yuzhong Zhang <BetterAndBetterII@users.noreply.github.com>
2026-08-30 15:37:38 +08:00