Lifecycle

Keep updates connected with stable IDs

Use stable IDs to keep every update connected to the correct response, tool, interaction, or approval.

Use a stable ID for each piece of work

responseId identifies an answer, and responseInstanceId separates its retry attempts. toolId identifies a tool call, and toolInstanceId separates repeated runs. interactionId and approvalId connect each request to its result.

EntityIdentityWhy it matters
ResponseresponseIdKeeps text and the final state together
AttemptresponseInstanceIdIgnores late text from an older retry
TooltoolId + toolInstanceIdSeparates repeated tool runs
InteractioninteractionIdConnects a request to its result
Adapter mountscopeIdPrevents ID collisions across chats

Labels are copy, not identity

Do not use displayed text, labels, array positions, or render counts as IDs because they can change. Framework adapters keep stable IDs from your framework and stop accepting unknown IDs after reaching their safety limit.