You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
conversation transport: abort active turn on client disconnect #7
When a client closes the tab / disconnects mid-turn, the conversation transport keeps the turn running to its full wall budget. POST /api/agent/sessions/:id/abort exists and works cleanly (ABORTED outcome + persisted partial transcript), but nothing wires client disconnect to it — request.raw.on('close') is never hooked to the per-turn AbortController in activeTurns.
Describe the solution you'd like
In the transport's message handler, when the request socket closes before the turn completes, call ac.abort() for that session's active turn (the same clean ABORTED path the explicit route uses). Should be gated by a deps flag (e.g. abortOnDisconnect?: boolean) so hosts can opt out — some deployments proxy long-polls where socket close is routine.
Context
Lionidas consumed this via plan 20261019T224955Z (agent-harness arc, PR #91) — everything else in that arc was host-side; this is the one seam that needs to live inside butler's transport.
Activity
thatswiftdev commentedon Oct 20, 2026
Fix up in #10 (opt-in
abortOnDisconnect, default off).Merge pull request #10 from MainActorDev/wt/disconnect-abort
thatswiftdev commentedon Oct 20, 2026
Shipped in #10 (merged 685090e) — opt-in
abortOnDisconnect, response-stream seam. Lionidas enables it on its side in its pin-bump PR.