Files
paseo/packages/plugin
Mohamed Boudra f7e2ab4076 Keep the full history when reopening a long Antigravity agent after a restart (#10428)
* fix(acp): keep the whole history when an agent streams it after session/load

Reopening a long Antigravity agent after a daemon restart lost the end of its
timeline. When the client reads slowly, agy answers session/load part-way
through the history and keeps streaming the rest, with no end marker. The
replay window closed after a fixed five quiet periods (1 s), and every history
update processed after that was discarded as stale.

The window now closes only once a quiet period passes without a history
update. Command, configuration, mode and usage updates no longer count as
activity, so they cannot hold the session open. When the quiet period expires,
the loop reads pending input once before the silence is trusted, because a
stalled event loop reaches the timer with history still unread in the pipe.

The wait has no upper bound: any bound is another way to truncate, and the
agent goes silent once its history is sent.

* fix(acp): stop waiting for history replay when the connection closes

With the replay wait no longer capped, closing the provider connection while a
session was still replaying waited for the whole history, so a daemon stop
during a long reopen could run past its deadline. The connection marks itself
closed and then awaits in-flight opens, but the replay wait only checked the
runtime's own closing flag. The wait now also ends when the connection closes.

* fix(acp): only extend replay on history updates and fail open on mid-replay crash

* fix(server): bound shutdown flush so provider shutdown cancels in-flight reopens

* fix(acp): keep load replay open while a multi-read wire record is in flight
2026-11-22 04:01:42 +07:00
..