pltbkd commented on issue #1279: URL: https://github.com/apache/flink-agents/issues/1279#issuecomment-6268134797
Thanks for looking into this, @wenjin272 and @Vamsi-2581 . In my opinion this is not only an issue of `ToolCallAction`, but also reflecting that we should make an error-handling contract of `SubagentFuture`, over deferred and async ones. Because the invoker cannot tell which kind of future is provided, the agreement should be the same. I think it's better to define as: `await` should be called (effectively) only once, it should return a `SubagentResult` (success or failure) or throw a non-retryable exception. Any retry should happen inside the await. In this way, users don't have to fail or cancel a `SubagentFuture` throwing exceptions, so I'd lean toward not adding a `fail(Exception)` hook: the terminal transition shouldn't be the caller's job. Cancellation/interruption would still propagate instead of being folded into a result, and caller-driven system-level exceptions keep failing the action as today. With this contract, we can remove `untrackPendingSubagentCall` on the completion path, but add a try-finally block wrapping the core of the await — `execute()` for the deferred future, the `!consumed` block for the async one — and untrack in the finally block. What do you think? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
