ag-ui-protocol / ag-ui-protocol/ag-ui

[Bug]: A2UI action retries generate different synthetic message identities

Aperta Adatta ai principianti
#2,711 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
15.9k
Fork
1.4k
Merge medio
2g 41m
PR unite (30g)
165

Descrizione

## Describe the Bug

A2UIMiddleware assigns fresh synthetic assistant, Tool call and result IDs each time it processes an action. Retrying the same run therefore produces a different backend request, preventing exact replay and potentially repeating the action.

## Steps to Reproduce

1. Create a RunAgentInput with a runId and forwardedProps.a2uiAction.
2. Process that input through A2UIMiddleware and record the synthetic message pair sent downstream.
3. Retry the same input with the same runId.
4. Compare the synthetic assistant message ID, Tool call ID and Tool result ID: all change.

## Expected Behavior

A retry of the same run preserves its synthetic identities. A new action uses a new runId and receives different identities even when the payload is identical.

## Environment

TypeScript A2UI middleware on current main; Node 22.23.1. The proposed fix is limited to action message creation and focused middleware tests.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inspect the A2UIMiddleware implementation where synthetic assistant, tool call, and tool result IDs are created during RunAgentInput processing. Review existing middleware tests that cover action message creation and retry behavior, focusing on forwardedProps.a2uiAction with a repeated runId. Add or extend a focused test to replay the same input twice and assert stable IDs when runId is unchanged, and changed identities for a new runId. Verify the relevant middleware test suite passes.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
node.js, typescript
Ambito
backend-api-design
Tipo di issue
Bug
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
72/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.