wrapCall helper (TypeScript). Every user and tool message is scanned before the request goes out.
Python
1
Install
2
Decorate the call
claude.py
@guard.wrap_async for an async def function.TypeScript
1
Install
2
Wrap the call
claude.ts
Tool use
Claude’s tool-use loop means tool outputs flow back into themessages array as tool_result blocks. Pass those through as role: "tool" messages so Benchspan scans them: