Include session IDs in tool item analytics events (#32903)

## What changed

- Add `session_id` to the shared tool item event payload, sourced from the
  thread metadata.
- Preserve the parent session ID on tool events emitted by subagent threads.

## Testing

- Cover serialization of the session ID for command execution events,
  subagent tool events, and every supported completed tool item type.

GitOrigin-RevId: 73afc0e1be1ddec4fb5a42f43a23f1e87360e68f
This commit is contained in:
marksteinbrick-oai authored and copyberry committed 2026-07-14 00:19:01 +00:00
1 parent 4657ab06c6
commit 7f3eb8a223
3 files changed
+51 -15

No files matched your search

+1
View File
@@ -2155,6 +2155,7 @@ fn tool_item_base(
let review_summary = context.review_summary.cloned().unwrap_or_default();
CodexToolItemEventBase {
thread_id: thread_id.to_string(),
session_id: thread_metadata.session_id.clone(),
turn_id: turn_id.to_string(),
item_id,
app_server_client: context