Commit a17033a
authored
fix(tool): preserve tool id and name in timeout error results (#1431)
When a tool call times out in `executeWithInfrastructure()`, the error
path via `onErrorResume` creates a `ToolResultBlock.error()` without
calling `withIdAndName()`. The normal path goes through `.map()` which
correctly sets id/name, but timeout errors bypass `.map()`.
This causes `PostActingEvent.getToolResult()` to return a
`ToolResultBlock` with null id and name, while `getToolResultMsg()` has
the correct values (rebuilt from `ToolUseBlock` by
`ToolResultMessageBuilder`).
Fix: chain `.withIdAndName(toolCall.getId(), toolCall.getName())` in the
`onErrorResume` handler.
Fixes #13891 parent a80e090 commit a17033a
1 file changed
Lines changed: 2 additions & 1 deletion
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
339 | | - | |
| 339 | + | |
| 340 | + | |
340 | 341 | | |
341 | 342 | | |
342 | 343 | | |
| |||
0 commit comments