Skip to content

fix: Make sure parallel agent calls get correct child spans in claude agent sdk#73

Merged
Abhijeet Prasad (AbhiPrasad) merged 3 commits intomainfrom
abhi-fix-parallel-sub-agents-claude-agent-sdk
Mar 12, 2026
Merged

fix: Make sure parallel agent calls get correct child spans in claude agent sdk#73
Abhijeet Prasad (AbhiPrasad) merged 3 commits intomainfrom
abhi-fix-parallel-sub-agents-claude-agent-sdk

Conversation

@AbhiPrasad
Copy link
Member

This was caused by a race condition with TaskStartedMessage where if multiple came in at once, the sdk only use the first one to reference what span to attach a child to. Fixed by just introducing another set of pointers to track all the tasks to their parents.

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Abhi just explained it to me, looks good

@AbhiPrasad Abhijeet Prasad (AbhiPrasad) merged commit 7184711 into main Mar 12, 2026
33 checks passed
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) deleted the abhi-fix-parallel-sub-agents-claude-agent-sdk branch March 12, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants