fix: before_tool_call hook double-fires with abort signal (#16852)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 6269d617f3
Co-authored-by: sreuter <550246+sreuter@users.noreply.github.com>
Co-authored-by: obviyus <22031114+obviyus@users.noreply.github.com>
Reviewed-by: @obviyus
This commit is contained in:
Sascha Reuter
2026-02-17 18:23:54 +11:00
committed by GitHub
parent 583844ecf6
commit 60dc3741c0
3 changed files with 21 additions and 1 deletions

View File

@@ -227,7 +227,7 @@ export function wrapToolWithBeforeToolCallHook(
};
Object.defineProperty(wrappedTool, BEFORE_TOOL_CALL_WRAPPED, {
value: true,
enumerable: false,
enumerable: true,
});
return wrappedTool;
}