From 3cebf7a1dfd4ecc4342998de9b397221677ee0ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Sibiril?= <81782+aureliensibiril@users.noreply.github.com> Date: Fri, 24 Apr 2026 19:59:06 +0200 Subject: [PATCH] Refine tool dispatch errors in resume path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prefix the unknown-tool error with the "cannot" convention and drop the duplicate wrap around executeSingleTool: that helper already wraps its generic error path, so the outer wrap produced messages shaped like "cannot execute tool X: cannot execute tool X: ...". Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com> --- pkg/agent/run.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/agent/run.go b/pkg/agent/run.go index 07de1f4cb..7cfcf9050 100644 --- a/pkg/agent/run.go +++ b/pkg/agent/run.go @@ -1332,7 +1332,7 @@ func resumeWithOpts(ctx context.Context, interrupted *InterruptedError, input Re desc, toolOK := toolMap[tc.Function.Name] if !toolOK { - return nil, fmt.Errorf("unknown tool %q", tc.Function.Name) + return nil, fmt.Errorf("cannot dispatch unknown tool %q", tc.Function.Name) } if ht, ok := desc.(*handoffToolAdapter); ok {