Refine tool dispatch errors in resume path

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>
This commit is contained in:
Aurélien Sibiril
2026-04-24 19:59:06 +02:00
parent d13c83c19f
commit 3cebf7a1df

View File

@@ -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 {