You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(server-utils): Emit execute_tool spans for Anthropic's beta.sessions.events.toolRunner() #25446
#25320 instruments beta.messages.toolRunner(), but the Managed Agents session runner, client.beta.sessions.events.toolRunner(sessionID, { tools }), runs tools too, and its tool calls get no spans. It runs each tool through runRunnableTool, which calls tool.run(input, { toolUse, toolUseBlock, signal }) and turns any throw into an error result, so a failing tool is also invisible to the app. A tool only gets a span today if the same object was also passed to beta.messages.toolRunner().
The contract is the same run(input, ctx) the messages runner uses, so the wrapping from #25320 should carry over. The new part is hooking sessions.events.toolRunner() on both the orchestrion and instrumentAnthropicAiClient paths, and checking whether tools added to a running session reach run without going through its options.
Activity
linear-code commentedon Oct 16, 2026
JS-3941