CLOSE_TURN_DRAIN_MS
constCLOSE_TURN_DRAIN_MS:2000=2000
Defined in: packages/agent/src/modules/acp/acpCommon.ts:62
How long session/close waits for an aborted turn to finish unwinding before proceeding anyway.
The wait is bounded because it cannot be trusted to end. A turn parked on
session/request_permission is waiting on the CLIENT, and ACP cancellation is cooperative: the
$/cancel_request we send settles the promise only when the peer answers it. A client that closes
a session while its own permission prompt is on screen and then never answers would otherwise
leave this handler suspended forever — and session/close would never get a response, which is a
worse failure than the narrow re-rooting window the wait exists to close.
On expiry the close proceeds exactly as it did before the wait existed. So the bound degrades to the previously accepted behaviour rather than to a hang, and an aborted turn — which unwinds in milliseconds — is unaffected.