mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
adding parent_thread_id in guardian (#17249)
## Summary This PR adds the parent conversation/session id to the subagent-start analytics event for Guardian subagents. Previously, Guardian sessions were emitted as subagent thread-initialized events, but their `parent_thread_id` was serialized as `null`. After this change, the `codex_thread_initialized` analytics event for a Guardian child session includes the parent user conversation id.
This commit is contained in:
committed by
GitHub
Unverified
parent
26a28afc6d
commit
4e910bf151
@@ -4582,6 +4582,7 @@ pub(crate) fn emit_subagent_session_started(
|
||||
analytics_events_client: &AnalyticsEventsClient,
|
||||
client_metadata: AppServerClientMetadata,
|
||||
thread_id: ThreadId,
|
||||
parent_thread_id: Option<ThreadId>,
|
||||
thread_config: ThreadConfigSnapshot,
|
||||
subagent_source: SubAgentSource,
|
||||
) {
|
||||
@@ -4599,6 +4600,7 @@ pub(crate) fn emit_subagent_session_started(
|
||||
.as_secs();
|
||||
analytics_events_client.track_subagent_thread_started(SubAgentThreadStartedInput {
|
||||
thread_id: thread_id.to_string(),
|
||||
parent_thread_id: parent_thread_id.map(|thread_id| thread_id.to_string()),
|
||||
product_client_id: client_name.clone(),
|
||||
client_name,
|
||||
client_version,
|
||||
|
||||
Reference in New Issue
Block a user