Commit 1acf59e
committed
docs(ai-chat): clarify lastEventId is sessionId-keyed across run boundaries
Clearing lastEventId on chat.endRun() looks intuitive (Run ended, cursor must be stale) but breaks the next-message subscription. The cursor is sessionId-keyed, not runId-keyed. Clearing it forces the next sendMessages to subscribe from seq_num=0, where it may hit the prior turn's still-durable turn-complete record and close the SSE empty before the new Run's chunks arrive.
Spells out the invariant in the frontend transport persistence table and adds a Warning in the chat.endRun() reference.1 parent c80b85e commit 1acf59e
2 files changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
588 | 592 | | |
589 | 593 | | |
590 | 594 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
0 commit comments