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.
| Entity | Identity | Why it matters |
|---|---|---|
| Response | responseId | Keeps text and the final state together |
| Attempt | responseInstanceId | Ignores late text from an older retry |
| Tool | toolId + toolInstanceId | Separates repeated tool runs |
| Interaction | interactionId | Connects a request to its result |
| Adapter mount | scopeId | Prevents 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.