Commit Graph

5 Commits

Author SHA1 Message Date
Bryan Frimin
5d2b394bac Include error in tool_end event for interrupted tools
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-14 12:28:26 +01:00
Bryan Frimin
9d999559f1 Emit OnToolEnd hooks for interrupted and failed tools
executeSingleTool had three exit paths but only the success path
emitted all end signals. The interrupted path (nested agent
approval) skipped OnToolEnd and StreamEventToolEnd entirely,
leaving hook consumers with an unpaired OnToolStart. The error
path also missed StreamEventToolEnd and AgentHooks.OnToolEnd.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 19:53:08 +01:00
Bryan Frimin
9f92a27b51 Emit tool-result for post-handoff tool calls
When the LLM returns tool calls after a handoff in the same
assistant message, they were silently dropped. This left
orphaned tool_call entries without matching tool-result
messages, causing protocol errors on the next LLM turn.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 18:28:37 +01:00
Bryan Frimin
a0ed50a908 Propagate nested agent approval interruptions through tool pipeline
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 18:01:36 +01:00
Bryan Frimin
9fd251ee5d Add agent library
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 17:21:43 +01:00