Skip to content

feat(claude_agent_sdk): trace top-level query calls#216

Merged
Abhijeet Prasad (AbhiPrasad) merged 1 commit intomainfrom
abhi-fix-instrument-claude-sdk-query
Apr 7, 2026
Merged

feat(claude_agent_sdk): trace top-level query calls#216
Abhijeet Prasad (AbhiPrasad) merged 1 commit intomainfrom
abhi-fix-instrument-claude-sdk-query

Conversation

@AbhiPrasad
Copy link
Copy Markdown
Member

Patch the exported claude_agent_sdk.query helper so one-shot queries emit the same task and LLM spans as ClaudeSDKClient. This preserves tracing when callers import query before setup and use the standalone API directly.

Refactor prompt capture and streamed message handling into shared helpers so the client and one-shot query paths stay aligned, and add a regression test that fails before the patch and verifies import-before-setup alias propagation.

ref #149

Patch the exported claude_agent_sdk.query helper so one-shot queries emit the same task and LLM spans as ClaudeSDKClient. This preserves tracing when callers import query before setup and use the standalone API directly.

Refactor prompt capture and streamed message handling into shared helpers so the client and one-shot query paths stay aligned, and add a regression test that fails before the patch and verifies import-before-setup alias propagation.
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) changed the title fix(claude_agent_sdk): trace top-level query calls feat(claude_agent_sdk): trace top-level query calls Apr 7, 2026
@starfolkai
Copy link
Copy Markdown

starfolkai bot commented Apr 7, 2026

Drop into this review session: sfk devbox connect pr-216-braintrust-sdk-python-c36c --attach

No serious bugs or issues found 🎉

@AbhiPrasad Abhijeet Prasad (AbhiPrasad) merged commit a0e7d54 into main Apr 7, 2026
29 checks passed
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) deleted the abhi-fix-instrument-claude-sdk-query branch April 7, 2026 19:17
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