# Claude subagent tool calls point to the tool that delegated them

> Agno's ClaudeAgent sets parent_tool_call_id on each ToolExecution and tool event a Claude subagent produces, so tracing can nest those calls under the delegating Agent tool.

- Published: 2026-10-12
- Author: Kaustubh Shukla
- Categories: Changelog
- Canonical: https://www.agno.com/blog/claude-subagent-tool-calls-point-to-the-tool-that-delegated-them
- Markdown: https://www.agno.com/blog/claude-subagent-tool-calls-point-to-the-tool-that-delegated-them.md

Agno's `ClaudeAgent` copies the `parent_tool_use_id` that the Claude Agent SDK puts on subagent messages into a new `parent_tool_call_id` field on `ToolExecution`. The field appears on streamed `ToolCallStartedEvent` and `ToolCallCompletedEvent`, and on the tools stored with the run.

When Claude hands work to a subagent through its `Agent` tool, the subagent's own Bash and Read calls used to land in the run as a flat list next to the parent's calls. Now each of them names the `Agent` call that started it, and calls Claude makes itself keep `None`.

```text
# real output, scripted Claude SDK messages in place of the model
ToolCallStartedEvent    Agent tool_call_id=toolu_agent  parent_tool_call_id=None
ToolCallStartedEvent    Bash  tool_call_id=toolu_bash   parent_tool_call_id=toolu_agent
ToolCallCompletedEvent  Bash  tool_call_id=toolu_bash   parent_tool_call_id=toolu_agent
ToolCallStartedEvent    Read  tool_call_id=toolu_read   parent_tool_call_id=toolu_agent
ToolCallCompletedEvent  Read  tool_call_id=toolu_read   parent_tool_call_id=toolu_agent
ToolCallCompletedEvent  Agent tool_call_id=toolu_agent  parent_tool_call_id=None
ToolCallStartedEvent    Bash  tool_call_id=toolu_bash2  parent_tool_call_id=None
ToolCallCompletedEvent  Bash  tool_call_id=toolu_bash2  parent_tool_call_id=None
```

In that run the SDK left the parent id off the Read result, and the completed event still carries `toolu_agent`, because ClaudeAgent keeps the lineage from the start message. Streamed completion events also keep the SDK's error flag on a failed subagent tool as `tool_call_error`. Tracing integrations can read the field to draw a subagent's spans under the `Agent` span that delegated them.

Learn more about [running Claude](https://docs.agno.com/agent-os/multi-framework/claude-agent-sdk) and [tracing](https://docs.agno.com/tracing/overview) in the documentation.
