Commit 216ccca
committed
fix(agent-core): track open exchange during pre-scan and remove cleaned messages from replay
- Pre-scan now tracks hasOpenToolExchange: a user message arriving
while a tool exchange is open is deferred, not a turn boundary.
This prevents valid same-turn tool calls from being marked stale.
- cleanupOrphanedToolCalls now removes orphaned messages from the
replay builder via removeLastMessages(), so ResumeSessionResult
doesn't include stale messages.1 parent e966bbd commit 216ccca
1 file changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
364 | 374 | | |
365 | 375 | | |
366 | 376 | | |
| |||
0 commit comments