Files
PaperClipAI/packages
Priya RamanandPaperclip d966069a78 fix(adapter-utils): skip the remote session close when the duplex channel is already lost
The teardown placed a remote session-close call over a duplex control
channel the runtime had already latched as lost. The call carries no
deadline of its own, so it blocked until the adapter execution timeout
released it, leaving the run row read as running long after the
outcome was known.

The turn-finalize settlement now marks a lost channel with
skipRemoteClose, and the end_session step releases the runtime locally
without placing the remote call when that flag is set.

Known residual: skipping the remote close also skips the vendored
runtime's only caller of closeBackendSession, so it keeps a retained
client for the run. A duplex loss proves only that the control channel
died, not that the backend process died. A separate tracked goal owns
that follow-up.

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-08-28 01:19:39 +00:00
..