Commit Graph

1 Commits (e6ecb9adcc8ddbb500957f77490ca5cb4c2fa8d4)

Author SHA1 Message Date
养乐多 e3ac49cace fix(agent): report failed tool executions as tool_result, not error
response_type=error was being emitted when a tool execution failed,
but that type is reserved for internal agent failures (LLM/pipeline
errors), which clients treat as a crashed run. A failed tool call is
still a tool result: both the chat SSE handler and the skill install
transcript now emit response_type=tool_result with success=false and
the error string in metadata, so clients render it as a failed tool
card and let the agent recover instead of treating the run as dead.

Frontend needs no change: useChatStreamHandler already resolves tool
outcome from the success metadata field, history replay rebuilds from
agent_steps, and the API playground stops failing a whole request on
a recoverable tool error.
2026-09-18 11:11:21 +08:00