fix(spans): propagate gen_ai.conversation.id to execute_tool spans - #108
Merged
Conversation
rgao-coreweave
force-pushed
the
fix/tool-span-conversation-id
branch
from
July 17, 2026 00:25
f8e133d to
500f313
Compare
HiveMind Sessions2 sessions · 15m · $4.22
View all sessions in HiveMind → Run |
startToolSpan was the only span builder not propagating gen_ai.conversation.id; tool spans inherited it from their root turn span at query time. If the root is lost to a hard crash (SIGKILL/OOM), the exported tool spans can't be stitched to a conversation. Propagate it directly so the tool span survives a lost root. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
rgao-coreweave
force-pushed
the
fix/tool-span-conversation-id
branch
from
July 17, 2026 00:31
500f313 to
845dbdf
Compare
Comments duplicated the PR description verbatim; kept a one-line why.
rgao-coreweave
marked this pull request as ready for review
July 17, 2026 06:18
andrewtruong
approved these changes
Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
startToolSpanwas the only span builder not propagatinggen_ai.conversation.id. Tool spans inherit it from their root turn span at query time, so if the root is lost to a hard crash (SIGKILL/OOM), already-exported tool spans can't be stitched to a conversation.Propagates it directly onto
execute_toolspans. Defense-in-depth alongside #107 (graceful-shutdown root fix), covering the hard-crash case.Test: new test drives a real PreToolUse and asserts the tool span carries the conversation id.