Skip to content

fix(claude_agent_sdk): use result message output#218

Open
Abhijeet Prasad (AbhiPrasad) wants to merge 1 commit intomainfrom
abhi-fix-claude-result-output
Open

fix(claude_agent_sdk): use result message output#218
Abhijeet Prasad (AbhiPrasad) wants to merge 1 commit intomainfrom
abhi-fix-claude-result-output

Conversation

@AbhiPrasad
Copy link
Copy Markdown
Member

Prefer ResultMessage.result as the root Claude Agent task output when the SDK provides it. The streamed assistant message can differ from the canonical final result, so the integration now records the final result value on the root span and falls back to the accumulated assistant content only when no result field is present.

Also tighten the existing cassette-backed calculator test to assert the root task output matches the result message.

ref #149

Prefer ResultMessage.result as the root Claude Agent task output when the SDK provides it. The streamed assistant message can differ from the canonical final result, so the integration now records the final result value on the root span and falls back to the accumulated assistant content only when no result field is present.

Also tighten the existing cassette-backed calculator test to assert the root task output matches the result message.
@starfolkai
Copy link
Copy Markdown

starfolkai bot commented Apr 7, 2026

Drop into this review session: sfk devbox connect pr-218-braintrust-sdk-python-42a5 --attach

No serious bugs or issues found 🎉

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