Summary
The auto-instrumentation plugin skips Agent tool spans entirely, even though the upstream SDK documents Agent as the canonical subagent tool name and Task as the previous alias. Manual wrapClaudeAgentSDK mode only skips Task, while the plugin skips both Agent and Task, so auto-instrumented traces lose the parent tool span that should sit above delegated task spans.
What instrumentation is missing
js/src/instrumentation/plugins/claude-agent-sdk-plugin.ts treats both Agent and Task as ignorable subagent tool names in PreToolUse.
- That means auto-instrumentation omits the
Agent tool execution span even when the SDK emits the current canonical tool name.
- Python's Claude Agent SDK integration starts tool spans from streamed tool-use blocks and keeps delegated task spans parented under the corresponding agent tool span when available.
Why this is a concrete gap
The upstream TypeScript docs call out Agent as the current name for this tool surface. Braintrust docs say the integration traces tool executions. In auto mode, the JS plugin drops this official tool execution entirely.
Braintrust docs status
supported
Exact upstream sources
Exact Braintrust docs sources
Exact local repo files inspected
js/src/instrumentation/plugins/claude-agent-sdk-plugin.ts
js/src/wrappers/claude-agent-sdk/claude-agent-sdk.ts
js/src/wrappers/claude-agent-sdk/claude-agent-sdk.test.ts
/Users/abhijeetprasad/workspace/braintrust-sdk-python/py/src/braintrust/wrappers/claude_agent_sdk/_wrapper.py
/Users/abhijeetprasad/workspace/braintrust-sdk-python/py/src/braintrust/wrappers/claude_agent_sdk/test_wrapper.py
Summary
The auto-instrumentation plugin skips
Agenttool spans entirely, even though the upstream SDK documentsAgentas the canonical subagent tool name andTaskas the previous alias. ManualwrapClaudeAgentSDKmode only skipsTask, while the plugin skips bothAgentandTask, so auto-instrumented traces lose the parent tool span that should sit above delegated task spans.What instrumentation is missing
js/src/instrumentation/plugins/claude-agent-sdk-plugin.tstreats bothAgentandTaskas ignorable subagent tool names inPreToolUse.Agenttool execution span even when the SDK emits the current canonical tool name.Why this is a concrete gap
The upstream TypeScript docs call out
Agentas the current name for this tool surface. Braintrust docs say the integration traces tool executions. In auto mode, the JS plugin drops this official tool execution entirely.Braintrust docs status
supportedExact upstream sources
Exact Braintrust docs sources
Exact local repo files inspected
js/src/instrumentation/plugins/claude-agent-sdk-plugin.tsjs/src/wrappers/claude-agent-sdk/claude-agent-sdk.tsjs/src/wrappers/claude-agent-sdk/claude-agent-sdk.test.ts/Users/abhijeetprasad/workspace/braintrust-sdk-python/py/src/braintrust/wrappers/claude_agent_sdk/_wrapper.py/Users/abhijeetprasad/workspace/braintrust-sdk-python/py/src/braintrust/wrappers/claude_agent_sdk/test_wrapper.py